mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
fix underired movement
This commit is contained in:
parent
71f74590d2
commit
06c48c44e0
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue