fix underired movement

This commit is contained in:
Alexsandro Percy 2023-10-29 19:38:44 -03:00
parent 616b3b4d60
commit 471242cc3c

View File

@ -515,7 +515,8 @@ function airutils.logic(self)
if self.wheels then if self.wheels then
if is_flying == false then --isn't flying? if is_flying == false then --isn't flying?
--animate wheels --animate wheels
if math.abs(longit_speed) > 0.1 then local min_speed_animation = 0.1
if math.abs(velocity.x) > min_speed_animation or math.abs(velocity.z) > min_speed_animation then
self.wheels:set_animation_frame_speed(longit_speed * 10) self.wheels:set_animation_frame_speed(longit_speed * 10)
else else
self.wheels:set_animation_frame_speed(0) self.wheels:set_animation_frame_speed(0)