This commit is contained in:
Frank
2019-04-15 23:59:20 +02:00
parent 178ee09614
commit 274771b212
10 changed files with 3795 additions and 11 deletions
@@ -655,6 +655,21 @@ function POSITIONABLE:GetVelocityVec3()
return nil
end
--- Get relative velocity with respect to another POSITIONABLE.
-- @param #POSITIONABLE self
-- @param #POSITIONABLE positionable Other positionable.
-- @return #number Relative velocity in m/s.
function POSITIONABLE:GetRelativeVelocity(positionable)
self:F2( self.PositionableName )
local v1=self:GetVelocityVec3()
local v2=positionable:GetVelocityVec3()
local vtot=UTILS.VecAdd(v1,v2)
return UTILS.VecNorm(vtot)
end
--- Returns the POSITIONABLE height in meters.
-- @param Wrapper.Positionable#POSITIONABLE self