mirror of
https://github.com/APercy/airutils.git
synced 2025-03-21 18:41:21 +00:00
fix underired movement
This commit is contained in:
parent
06c48c44e0
commit
616b3b4d60
1 changed files with 4 additions and 1 deletions
|
@ -98,8 +98,11 @@ function airutils.physics(self)
|
||||||
|
|
||||||
--self.object:set_velocity(new_velocity)
|
--self.object:set_velocity(new_velocity)
|
||||||
--new_velocity = vector.subtract(new_velocity,vel)
|
--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
|
|
||||||
|
--fix bug with unexpe3cted moving
|
||||||
|
if not self.driver_name and math.abs(vel.x) < 0.2 and math.abs(vel.z) < 0.2 then
|
||||||
self.object:set_velocity({x=0,y=airutils.gravity*self.dtime,z=0})
|
self.object:set_velocity({x=0,y=airutils.gravity*self.dtime,z=0})
|
||||||
|
if self.wheels then self.wheels:set_animation_frame_speed(0) end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue