From 06c48c44e02a3b4281aec37995582c8628e8f948 Mon Sep 17 00:00:00 2001 From: Alexsandro Percy Date: Sun, 29 Oct 2023 19:21:32 -0300 Subject: [PATCH] fix underired movement --- lib_planes/custom_physics.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_planes/custom_physics.lua b/lib_planes/custom_physics.lua index a6b1933..3de7414 100755 --- a/lib_planes/custom_physics.lua +++ b/lib_planes/custom_physics.lua @@ -98,6 +98,10 @@ function airutils.physics(self) --self.object:set_velocity(new_velocity) --new_velocity = vector.subtract(new_velocity,vel) + if not self.driver_name and math.abs(vel.x) < 0.1 and math.abs(vel.z) < 0.1 then + self.object:set_velocity({x=0,y=airutils.gravity*self.dtime,z=0}) + return + end end self.object:add_velocity(new_velocity)