public override void SteerRotation(Vector2 steerInput) { Vector3 _wsSteerRotation = LocomotionUtils.StickInputToWorldSpaceTransform(steerInput, (!IsInShallowWater) ? LocomotionUtils.AxisIndex.Y : LocomotionUtils.AxisIndex.Z); if (snapToDesiredFacing || (int)Vector3.Angle(desiredFacing, _wsSteerRotation) > mutableData.RotationDegreesOffsetThreshold) { applyWorldSpaceSteerRotation(ref _wsSteerRotation); } }
public override void Steer(Vector2 steerInput) { stickMagnitude = steerInput.magnitude; Vector3 wsForward = default(Vector3); Vector3 wsUp = default(Vector3); LocomotionUtils.StickInputToWorldSpaceTransform(steerInput, out wsForward, out wsUp, (!IsInShallowWater) ? LocomotionUtils.AxisIndex.Y : LocomotionUtils.AxisIndex.Z); applyWorldSpaceSteering(ref wsForward, ref wsUp); }