mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
sync transforms after moving player
This commit is contained in:
parent
072c3e95a5
commit
f515d054c7
@ -102,6 +102,11 @@ public class RaftTransformSync : UnsectoredRigidbodySync, ILinkedNetworkBehaviou
|
||||
|
||||
playerBody.SetPosition(AttachedTransform.FromRelPos(relPos));
|
||||
playerBody.SetRotation(AttachedTransform.FromRelRot(relRot));
|
||||
|
||||
if (!Physics.autoSyncTransforms)
|
||||
{
|
||||
Physics.SyncTransforms();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -74,6 +74,11 @@ public class ShipTransformSync : SectoredRigidbodySync
|
||||
|
||||
playerBody.SetPosition(AttachedTransform.FromRelPos(relPos));
|
||||
playerBody.SetRotation(AttachedTransform.FromRelRot(relRot));
|
||||
|
||||
if (!Physics.autoSyncTransforms)
|
||||
{
|
||||
Physics.SyncTransforms();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -75,6 +75,11 @@ public class OccasionalTransformSync : UnsectoredRigidbodySync
|
||||
AttachedRigidbody.SetAngularVelocity(ReferenceRigidbody.FromRelAngVel(AngularVelocity));
|
||||
|
||||
Move();
|
||||
|
||||
if (!Physics.autoSyncTransforms)
|
||||
{
|
||||
Physics.SyncTransforms();
|
||||
}
|
||||
}
|
||||
|
||||
private readonly List<MoveData> _toMove = new();
|
||||
@ -125,4 +130,4 @@ public class OccasionalTransformSync : UnsectoredRigidbodySync
|
||||
|
||||
_toMove.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user