forked from VoxeLibre/VoxeLibre
[mcl_mobs/api] Continue float function on acceleration.y equals zero
This commit is contained in:
parent
61b0220951
commit
586c18b00f
|
@ -32,12 +32,15 @@ end
|
||||||
mobs.float = function(self)
|
mobs.float = function(self)
|
||||||
|
|
||||||
local acceleration = self.object:get_acceleration()
|
local acceleration = self.object:get_acceleration()
|
||||||
if acceleration and acceleration.y ~= 0 then
|
|
||||||
self.object:set_acceleration(vector.new(0,0,0))
|
if not acceleration then
|
||||||
else
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if acceleration.y ~= 0 then
|
||||||
|
self.object:set_acceleration({x=0, y=0, z=0})
|
||||||
|
end
|
||||||
|
|
||||||
local current_velocity = self.object:get_velocity()
|
local current_velocity = self.object:get_velocity()
|
||||||
|
|
||||||
local goal_velocity = {
|
local goal_velocity = {
|
||||||
|
|
Loading…
Reference in New Issue