public static float MoveTowardsAngle(float current, float target, float maxDelta) { target = current + Mathf.DeltaAngle(current, target); return(Mathf.MoveTowards(current, target, maxDelta)); }
public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime, [DefaultValue("Mathf.Infinity")] float maxSpeed, [DefaultValue("Time.deltaTime")] float deltaTime) { target = current + Mathf.DeltaAngle(current, target); return(Mathf.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime)); }
public static float SmoothDampAngle(float current, float target, ref float currentVelocity, float smoothTime, float maxSpeed, float deltaTime) { target = current + Mathf.DeltaAngle(current, target); return(Mathf.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime)); }