Hands work at 30hz
parent
438bd19300
commit
edcca2e390
|
|
@ -45,7 +45,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
networkObject: {fileID: 1210055141702294256}
|
networkObject: {fileID: 1210055141702294256}
|
||||||
serializationRateHz: 10
|
serializationRateHz: 30
|
||||||
hand: {fileID: 0}
|
hand: {fileID: 0}
|
||||||
toSync:
|
toSync:
|
||||||
- {fileID: 6270683889218838997}
|
- {fileID: 6270683889218838997}
|
||||||
|
|
@ -257,7 +257,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
networkObject: {fileID: 1210055141702294256}
|
networkObject: {fileID: 1210055141702294256}
|
||||||
serializationRateHz: 10
|
serializationRateHz: 30
|
||||||
hand: {fileID: 0}
|
hand: {fileID: 0}
|
||||||
toSync:
|
toSync:
|
||||||
- {fileID: 8015258244566099424}
|
- {fileID: 8015258244566099424}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,13 @@ public class VelNetSyncHand : NetworkSerializedObject
|
||||||
if(!IsMine) {
|
if(!IsMine) {
|
||||||
for (int i = 0; i < targets.Length; i++)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue