Beispiel #1
0
        public static double SmoothDamp(double current, double target, ref double currentVelocity, double smoothTime)
        {
            double deltaTime = UnityEngine.Time.deltaTime;
            double maxSpeed  = double.PositiveInfinity;

            return(Mathd.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime));
        }
Beispiel #2
0
 public static double SmoothDampAngle(double current, double target, ref double currentVelocity, double smoothTime, double maxSpeed, double deltaTime)
 {
     target = current + Mathd.DeltaAngle(current, target);
     return(Mathd.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime));
 }
Beispiel #3
0
        public static double SmoothDamp(double current, double target, ref double currentVelocity, double smoothTime, double maxSpeed)
        {
            double deltaTime = (double)UnityEngine.Time.deltaTime;

            return(Mathd.SmoothDamp(current, target, ref currentVelocity, smoothTime, maxSpeed, deltaTime));
        }