diff --git a/RelativeSync/RelativeSync/Components/RelativeSyncController.cs b/RelativeSync/RelativeSync/Components/RelativeSyncController.cs index 0b612d5..8f62322 100644 --- a/RelativeSync/RelativeSync/Components/RelativeSyncController.cs +++ b/RelativeSync/RelativeSync/Components/RelativeSyncController.cs @@ -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; diff --git a/RelativeSync/RelativeSync/RelativeSyncManager.cs b/RelativeSync/RelativeSync/RelativeSyncManager.cs index 682926c..940dd1a 100644 --- a/RelativeSync/RelativeSync/RelativeSyncManager.cs +++ b/RelativeSync/RelativeSync/RelativeSyncManager.cs @@ -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(