protected virtual void FixedUpdate() { smoothYaw.FixedUpdate(); smoothPitch.FixedUpdate(); smoothPosition.FixedUpdate(); smoothVelocity.FixedUpdate(); rigidbody.velocity = MovementHelper.GetCorrectedVelocity(smoothPosition.SmoothValue, smoothVelocity.SmoothValue, gameObject, PlayerMovement.BROADCAST_INTERVAL); smoothRotation.FixedUpdate(); smoothAngularVelocity.FixedUpdate(); rigidbody.angularVelocity = MovementHelper.GetCorrectedAngularVelocity(smoothRotation.SmoothValue, smoothAngularVelocity.SmoothValue, gameObject, PlayerMovement.BROADCAST_INTERVAL); }
protected virtual void FixedUpdate() { SmoothYaw.FixedUpdate(); SmoothPitch.FixedUpdate(); SmoothPosition.FixedUpdate(); SmoothVelocity.FixedUpdate(); rigidbody.isKinematic = false; // we should maybe find a way to remove UWE's FreezeRigidBodyWhenFar component...tried removing it but caused a bunch of issues. rigidbody.velocity = MovementHelper.GetCorrectedVelocity(SmoothPosition.SmoothValue, SmoothVelocity.SmoothValue, gameObject, PlayerMovement.BROADCAST_INTERVAL); SmoothRotation.FixedUpdate(); SmoothAngularVelocity.FixedUpdate(); rigidbody.angularVelocity = MovementHelper.GetCorrectedAngularVelocity(SmoothRotation.SmoothValue, SmoothAngularVelocity.SmoothValue, gameObject, PlayerMovement.BROADCAST_INTERVAL); }
public void FixedUpdate() { if (swimBehaviour) { return; } smoothPosition.FixedUpdate(); smoothRotation.FixedUpdate(); rigidbody.isKinematic = false; rigidbody.velocity = MovementHelper.GetCorrectedVelocity(smoothPosition.Current, Vector3.zero, gameObject, EntityPositionBroadcaster.BROADCAST_INTERVAL); rigidbody.angularVelocity = MovementHelper.GetCorrectedAngularVelocity(smoothRotation.Current, Vector3.zero, gameObject, EntityPositionBroadcaster.BROADCAST_INTERVAL); }