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
|
// set last sync data to current position and rotation so we don't lerp from the last marker
|
||||||
_lastSyncData.LocalRootPosition = relativePosition;
|
_lastSyncData.LocalRootPosition = relativePosition;
|
||||||
_lastSyncData.LocalRootRotation = relativeRotation;
|
_lastSyncData.LocalRootRotation = relativeRotation;
|
||||||
|
_lastUpdate = Time.time; // reset update time
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRelativePositions(
|
public void SetRelativePositions(Vector3 position, Vector3 rotation)
|
||||||
Vector3 position, Vector3 rotation)
|
|
||||||
{
|
{
|
||||||
// calculate update interval
|
// calculate update interval
|
||||||
float prevUpdate = _lastUpdate;
|
float prevUpdate = _lastUpdate;
|
||||||
|
|
|
@ -28,8 +28,8 @@ public static class RelativeSyncManager
|
||||||
RelativeSyncMarker syncMarker = null;
|
RelativeSyncMarker syncMarker = null;
|
||||||
if (target != NoTarget) RelativeSyncTransforms.TryGetValue(target, out syncMarker);
|
if (target != NoTarget) RelativeSyncTransforms.TryGetValue(target, out syncMarker);
|
||||||
|
|
||||||
controller.SetRelativePositions(position, rotation);
|
|
||||||
controller.SetRelativeSyncMarker(syncMarker);
|
controller.SetRelativeSyncMarker(syncMarker);
|
||||||
|
controller.SetRelativePositions(position, rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void GetRelativeAvatarPositionsFromMarker(
|
public static void GetRelativeAvatarPositionsFromMarker(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue