public static float GetGravityFake() { return(Physics.gravity.y * Universals.GetTimeFake()); }
private void MovementLerpUnifiedXZ() { //Debug.Log(velocity_endgoal); float ratio; if (Mathf.Abs(velocity_endgoal.x - velocity.x) > Mathf.Abs(velocity_endgoal.z - velocity.z)) { ratio = Mathf.Abs(velocity_endgoal.z - velocity.z) / Mathf.Abs(velocity_endgoal.x - velocity.x); velocity.x = Universals.LerpBetter(velocity.x, velocity_endgoal.x, acceleration_true * Universals.GetTimeFake()); velocity.z = Universals.LerpBetter(velocity.z, velocity_endgoal.z, acceleration_true * ratio * Universals.GetTimeFake()); } else { ratio = Mathf.Abs(velocity_endgoal.x - velocity.x) / Mathf.Abs(velocity_endgoal.z - velocity.z); velocity.z = Universals.LerpBetter(velocity.z, velocity_endgoal.z, acceleration_true * Universals.GetTimeFake()); velocity.x = Universals.LerpBetter(velocity.x, velocity_endgoal.x, acceleration_true * ratio * Universals.GetTimeFake()); } }