mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-02-22 03:40:54 +00:00
make it work for other rafts
This commit is contained in:
parent
2e20c82d1f
commit
ae62a11aac
@ -15,8 +15,8 @@ public class RaftTransformSync : UnsectoredRigidbodySync, ILinkedNetworkBehaviou
|
||||
/// or in air near the raft
|
||||
/// </summary>
|
||||
private bool ShouldMovePlayer =>
|
||||
(_worldObject.AttachedObject is RaftController raft && raft.IsPlayerRiding()) ||
|
||||
(!Locator.GetPlayerController().IsGrounded() && Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 10);
|
||||
Locator.GetPlayerController().GetGroundBody() == AttachedRigidbody ||
|
||||
(Locator.GetPlayerController().GetGroundBody() == null && Vector3.Distance(AttachedTransform.position, Locator.GetPlayerBody().GetPosition()) < 10);
|
||||
protected override bool UseInterpolation => !ShouldMovePlayer;
|
||||
|
||||
private float _lastSetPositionTime;
|
||||
|
Loading…
x
Reference in New Issue
Block a user