Beispiel #1
0
        public static void LerpForwardFriction(WheelCollider wheel, WheelFrictions from, WheelFrictions to, float factor)
        {
            var friction = wheel.forwardFriction;

            Friction.LerpFriction(ref friction, from.forward, to.forward, factor);
            wheel.forwardFriction = friction;
        }
Beispiel #2
0
        public static void LerpSidewaysFriction(WheelCollider wheel, WheelFrictions from, WheelFrictions to, float factor)
        {
            var friction = wheel.sidewaysFriction;

            Friction.LerpFriction(ref friction, from.sideways, to.sideways, factor);
            wheel.sidewaysFriction = friction;
        }
Beispiel #3
0
 public static void LerpFrictions(WheelCollider wheel, WheelFrictions from, WheelFrictions to, float factor)
 {
     LerpForwardFriction(wheel, from, to, factor);
     LerpSidewaysFriction(wheel, from, to, factor);
 }