mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
set rb not tf
This commit is contained in:
parent
2775fd67ff
commit
be8776473d
@ -271,9 +271,9 @@ void UpdateClient()
|
|||||||
// Quaternions always need to be normalized in order to be a valid rotation after operations
|
// Quaternions always need to be normalized in order to be a valid rotation after operations
|
||||||
Quaternion newRotation = Quaternion.Slerp(currentRotation, lastReceivedState.rotation, rotationBlendingSpeed * deltaTime).normalized;
|
Quaternion newRotation = Quaternion.Slerp(currentRotation, lastReceivedState.rotation, rotationBlendingSpeed * deltaTime).normalized;
|
||||||
|
|
||||||
|
// assign rigidbody position & rotation while keeping velocity to keep moving
|
||||||
// assign position and rotation together. faster than accessing manually.
|
predictedRigidbody.MovePosition(newPosition);
|
||||||
tf.SetPositionAndRotation(newPosition, newRotation);
|
predictedRigidbody.MoveRotation(newRotation);
|
||||||
|
|
||||||
// blend for 2 x syncinterval.
|
// blend for 2 x syncinterval.
|
||||||
// TODO configurable
|
// TODO configurable
|
||||||
|
Loading…
Reference in New Issue
Block a user