mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
[RelativeSync] Fixed sitting in chair sometimes interpolating weirdly
This commit is contained in:
parent
974fefd896
commit
f1dd196304
2 changed files with 3 additions and 3 deletions
|
@ -154,10 +154,10 @@ public class RelativeSyncController : MonoBehaviour
|
|||
// set last sync data to current position and rotation so we don't lerp from the last marker
|
||||
_lastSyncData.LocalRootPosition = relativePosition;
|
||||
_lastSyncData.LocalRootRotation = relativeRotation;
|
||||
_lastUpdate = Time.time; // reset update time
|
||||
}
|
||||
|
||||
public void SetRelativePositions(
|
||||
Vector3 position, Vector3 rotation)
|
||||
public void SetRelativePositions(Vector3 position, Vector3 rotation)
|
||||
{
|
||||
// calculate update interval
|
||||
float prevUpdate = _lastUpdate;
|
||||
|
|
|
@ -28,8 +28,8 @@ public static class RelativeSyncManager
|
|||
RelativeSyncMarker syncMarker = null;
|
||||
if (target != NoTarget) RelativeSyncTransforms.TryGetValue(target, out syncMarker);
|
||||
|
||||
controller.SetRelativePositions(position, rotation);
|
||||
controller.SetRelativeSyncMarker(syncMarker);
|
||||
controller.SetRelativePositions(position, rotation);
|
||||
}
|
||||
|
||||
public static void GetRelativeAvatarPositionsFromMarker(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue