mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
comments
This commit is contained in:
parent
bab559f2b6
commit
4643d01573
@ -313,6 +313,8 @@ void FixedUpdateClient()
|
||||
// in theory we must always set rigidbody.position/rotation instead of transform:
|
||||
// https://forum.unity.com/threads/how-expensive-is-physics-synctransforms.1366146/#post-9557491
|
||||
// however, tf.SetPositionAndRotation is faster in our Prediction Benchmark.
|
||||
// predictedRigidbody.position = newPosition;
|
||||
// predictedRigidbody.rotation = newRotation;
|
||||
tf.SetPositionAndRotation(newPosition, newRotation);
|
||||
|
||||
// transition to FOLLOWING after blending is done.
|
||||
@ -333,6 +335,8 @@ void FixedUpdateClient()
|
||||
// https://forum.unity.com/threads/how-expensive-is-physics-synctransforms.1366146/#post-9557491
|
||||
// however, tf.SetPositionAndRotation is faster in our Prediction Benchmark.
|
||||
// TODO snapshot interpolation
|
||||
// predictedRigidbody.position = lastReceivedState.position;
|
||||
// predictedRigidbody.rotation = lastReceivedState.rotation;
|
||||
tf.SetPositionAndRotation(lastReceivedState.position, lastReceivedState.rotation);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user