Billiards: use FAST mode

This commit is contained in:
mischa 2024-03-28 14:19:48 +08:00
parent 970b7e774f
commit c487c87274
3 changed files with 5 additions and 9 deletions

View File

@ -165,6 +165,7 @@ MonoBehaviour:
syncMode: 0
syncInterval: 0
predictedRigidbody: {fileID: -177125271246800426}
mode: 1
motionSmoothingVelocityThreshold: 0.1
motionSmoothingAngularVelocityThreshold: 5
motionSmoothingTimeTolerance: 0.5
@ -175,7 +176,6 @@ MonoBehaviour:
positionCorrectionThreshold: 0.1
rotationCorrectionThreshold: 5
oneFrameAhead: 1
correctionMode: 1
snapThreshold: 2
showGhost: 1
ghostVelocityThreshold: 0.1
@ -186,4 +186,3 @@ MonoBehaviour:
rotationInterpolationSpeed: 10
teleportDistanceMultiplier: 10
reduceSendsWhileIdle: 1
lineTime: 10

View File

@ -282,6 +282,7 @@ MonoBehaviour:
syncMode: 0
syncInterval: 0
dragIndicator: {fileID: 982362982}
dragTolerance: 1
rigidBody: {fileID: 1848203816128897140}
forceMultiplier: 2
maxForce: 40
@ -301,6 +302,7 @@ MonoBehaviour:
syncMode: 0
syncInterval: 0
predictedRigidbody: {fileID: 1848203816128897140}
mode: 1
motionSmoothingVelocityThreshold: 0.1
motionSmoothingAngularVelocityThreshold: 5
motionSmoothingTimeTolerance: 0.5
@ -311,7 +313,6 @@ MonoBehaviour:
positionCorrectionThreshold: 0.1
rotationCorrectionThreshold: 5
oneFrameAhead: 1
correctionMode: 1
snapThreshold: 2
showGhost: 1
ghostVelocityThreshold: 0.1
@ -322,4 +323,3 @@ MonoBehaviour:
rotationInterpolationSpeed: 10
teleportDistanceMultiplier: 10
reduceSendsWhileIdle: 1
lineTime: 10

View File

@ -11,11 +11,8 @@ If you are advanced, this demo shows how to use Mirror's prediction features for
Billiards is a great example to try our Prediction algorithm, it works extremely well here!
The only part we don't love yet is this:
- each ball has a PredictedRigidbody component and Rigidbody+Collider
- while predicting, PredictedRigibody sometimes moves the Rigidbody+Collider onto a temporary ghost object
- this works well, the only downside is that OnTriggerEnter etc. won't work on the main object while there's no collider.
=> we are looking to make this part easier in the future
=> We use 'Fast' Prediction mode for Billiards because we want to see exact collisions with balls/walls.
=> 'Smooth' mode would look too soft, with balls changing direction even before touching other balls/walls.
Notes:
- Red/White ball Rigidbody CollisionMode needs to be ContinousDynamic to avoid white flying through red sometimes.