grab rb pos for now

This commit is contained in:
mischa 2024-04-03 18:47:35 +08:00
parent f9a5ff72c4
commit a7826711c3

View File

@ -269,9 +269,8 @@ void FixedUpdateClient()
Debug.Log($"{name} BLENDING @ {blendingElapsed:F2} / {blendingTime:F2} => {(p*100):F0}%"); Debug.Log($"{name} BLENDING @ {blendingElapsed:F2} / {blendingTime:F2} => {(p*100):F0}%");
// blend local position to remote position // blend local position to remote position
Vector3 currentPosition = predictedRigidbody.position;
// FAST VERSION: this shows in profiler a lot, so cache EVERYTHING! Quaternion currentRotation = predictedRigidbody.rotation;
tf.GetPositionAndRotation(out Vector3 currentPosition, out Quaternion currentRotation); // faster than tf.position + tf.rotation
// smoothly interpolate to the target position. // smoothly interpolate to the target position.
// speed relative to how far away we are. // speed relative to how far away we are.