This commit is contained in:
parent
823ff7e22e
commit
faa944193a
1 changed files with 4 additions and 1 deletions
|
@ -276,10 +276,13 @@ end
|
||||||
local get_velocity = function(self)
|
local get_velocity = function(self)
|
||||||
|
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
|
if v then
|
||||||
return (v.x * v.x + v.z * v.z) ^ 0.5
|
return (v.x * v.x + v.z * v.z) ^ 0.5
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- set and return valid yaw
|
-- set and return valid yaw
|
||||||
local set_yaw = function(self, yaw, delay)
|
local set_yaw = function(self, yaw, delay)
|
||||||
|
|
Reference in a new issue