diff --git a/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VRPlayerPrefab.prefab b/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VRPlayerPrefab.prefab index 7d37caf..b6c143a 100644 --- a/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VRPlayerPrefab.prefab +++ b/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VRPlayerPrefab.prefab @@ -45,7 +45,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: networkObject: {fileID: 1210055141702294256} - serializationRateHz: 10 + serializationRateHz: 30 hand: {fileID: 0} toSync: - {fileID: 6270683889218838997} @@ -257,7 +257,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: networkObject: {fileID: 1210055141702294256} - serializationRateHz: 10 + serializationRateHz: 30 hand: {fileID: 0} toSync: - {fileID: 8015258244566099424} diff --git a/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VelNetSyncHand.cs b/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VelNetSyncHand.cs index a987c99..ad1be07 100644 --- a/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VelNetSyncHand.cs +++ b/TestVelGameServer/Assets/Samples/VelNet/1.0.4/Example/VelNetSyncHand.cs @@ -82,7 +82,13 @@ public class VelNetSyncHand : NetworkSerializedObject if(!IsMine) { for (int i = 0; i < targets.Length; i++) { - toSync[i].rotation = Quaternion.Slerp(transform.rotation, targets[i], 1 / smoothness / serializationRateHz); + + toSync[i].rotation = Quaternion.RotateTowards( + toSync[i].rotation, + targets[i], + Time.deltaTime * Quaternion.Angle(targets[i], toSync[i].rotation) * serializationRateHz + ); + //toSync[i].rotation = Quaternion.Slerp(transform.rotation, targets[i], 1 / smoothness / serializationRateHz); } }