mirror of
https://github.com/APercy/airutils.git
synced 2025-03-15 08:01:22 +00:00
improving plane movement
This commit is contained in:
parent
f5d727a38f
commit
f36c129d64
1 changed files with 6 additions and 5 deletions
|
@ -481,11 +481,12 @@ function airutils.logic(self)
|
|||
if stop ~= true then --maybe == nil
|
||||
self._last_accell = new_accel
|
||||
self.object:move_to(curr_pos)
|
||||
--self.object:set_velocity(velocity)
|
||||
--[[if player then
|
||||
airutils.attach(self, player, self._instruction_mode)
|
||||
end]]--
|
||||
airutils.set_acceleration(self.object, new_accel)
|
||||
--airutils.set_acceleration(self.object, new_accel)
|
||||
local limit = 100
|
||||
local vel_to_add = vector.multiply(new_accel,self.dtime)
|
||||
vel_to_add.y = 0
|
||||
self.object:add_velocity(vel_to_add)
|
||||
self.object:set_acceleration({x=0,y=new_accel.y, z=0})
|
||||
else
|
||||
if stop == true then
|
||||
self._last_accell = self.object:get_acceleration()
|
||||
|
|
Loading…
Add table
Reference in a new issue