From 613f84b49446a538871b9eb8e20e4bfbe9034faf Mon Sep 17 00:00:00 2001 From: mischa Date: Thu, 14 Sep 2023 11:29:33 +0200 Subject: [PATCH] fix: Billiards / BilliardsPredicted ball Rigidbody CollisionMode changed from Continous to ContinousDynamic to fix white flying through red when applying large forces --- Assets/Mirror/Examples/Billiards/Ball/Red.prefab | 2 +- Assets/Mirror/Examples/Billiards/Ball/White.prefab | 2 +- Assets/Mirror/Examples/Billiards/_Readme.txt | 6 +++++- .../Examples/BilliardsPredicted/Ball/RedPredicted.prefab | 2 +- .../Examples/BilliardsPredicted/Ball/WhitePredicted.prefab | 2 +- Assets/Mirror/Examples/BilliardsPredicted/_Readme.txt | 6 +++++- 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Assets/Mirror/Examples/Billiards/Ball/Red.prefab b/Assets/Mirror/Examples/Billiards/Ball/Red.prefab index 6b279efa1..ba537c840 100644 --- a/Assets/Mirror/Examples/Billiards/Ball/Red.prefab +++ b/Assets/Mirror/Examples/Billiards/Ball/Red.prefab @@ -133,7 +133,7 @@ Rigidbody: m_IsKinematic: 0 m_Interpolate: 1 m_Constraints: 0 - m_CollisionDetection: 1 + m_CollisionDetection: 2 --- !u!114 &5308121378143249733 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/Billiards/Ball/White.prefab b/Assets/Mirror/Examples/Billiards/Ball/White.prefab index 100a654fb..25ef36915 100644 --- a/Assets/Mirror/Examples/Billiards/Ball/White.prefab +++ b/Assets/Mirror/Examples/Billiards/Ball/White.prefab @@ -265,7 +265,7 @@ Rigidbody: m_IsKinematic: 0 m_Interpolate: 1 m_Constraints: 0 - m_CollisionDetection: 1 + m_CollisionDetection: 2 --- !u!114 &6607303410184343467 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/Billiards/_Readme.txt b/Assets/Mirror/Examples/Billiards/_Readme.txt index 1008603f1..332eb2c44 100644 --- a/Assets/Mirror/Examples/Billiards/_Readme.txt +++ b/Assets/Mirror/Examples/Billiards/_Readme.txt @@ -7,4 +7,8 @@ Hits are sent to the server with a [Command]. There will always be some latency for the results to show. To solve this, there's another BilliardsPredicted demo which uses prediction & reconciliation. -This demo however is meant for complete beginners to learn Mirror! \ No newline at end of file +This demo however is meant for complete beginners to learn Mirror! + +Notes: +- Red/White ball Rigidbody CollisionMode needs to be ContinousDynamic to avoid white flying through red sometimes. + even 'Continous' is not enough, we need ContinousDynamic. \ No newline at end of file diff --git a/Assets/Mirror/Examples/BilliardsPredicted/Ball/RedPredicted.prefab b/Assets/Mirror/Examples/BilliardsPredicted/Ball/RedPredicted.prefab index a482efbd6..a5a711974 100644 --- a/Assets/Mirror/Examples/BilliardsPredicted/Ball/RedPredicted.prefab +++ b/Assets/Mirror/Examples/BilliardsPredicted/Ball/RedPredicted.prefab @@ -133,7 +133,7 @@ Rigidbody: m_IsKinematic: 0 m_Interpolate: 1 m_Constraints: 0 - m_CollisionDetection: 1 + m_CollisionDetection: 2 --- !u!114 &5308121378143249733 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/BilliardsPredicted/Ball/WhitePredicted.prefab b/Assets/Mirror/Examples/BilliardsPredicted/Ball/WhitePredicted.prefab index bad93f91f..ad6878dbb 100644 --- a/Assets/Mirror/Examples/BilliardsPredicted/Ball/WhitePredicted.prefab +++ b/Assets/Mirror/Examples/BilliardsPredicted/Ball/WhitePredicted.prefab @@ -265,7 +265,7 @@ Rigidbody: m_IsKinematic: 0 m_Interpolate: 1 m_Constraints: 0 - m_CollisionDetection: 1 + m_CollisionDetection: 2 --- !u!114 &6607303410184343467 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/Mirror/Examples/BilliardsPredicted/_Readme.txt b/Assets/Mirror/Examples/BilliardsPredicted/_Readme.txt index ed0f01895..5e4e0bb8b 100644 --- a/Assets/Mirror/Examples/BilliardsPredicted/_Readme.txt +++ b/Assets/Mirror/Examples/BilliardsPredicted/_Readme.txt @@ -5,4 +5,8 @@ If you are a beginner, start with the basic Billiards demo instead. If you are advanced, this demo shows how to use Mirror's prediction features for physics / FPS games. The demo is work in progress. -At the moment, this is only for the Mirror team to test individual prediction features! \ No newline at end of file +At the moment, this is only for the Mirror team to test individual prediction features! + +Notes: +- Red/White ball Rigidbody CollisionMode needs to be ContinousDynamic to avoid white flying through red sometimes. + even 'Continous' is not enough, we need ContinousDynamic.