mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
AI_CAP Created
-- Documentation -- Coding -- Test Missions -- Presentations
This commit is contained in:
@@ -45,6 +45,7 @@ POSITIONABLE = {
|
||||
function POSITIONABLE:New( PositionableName )
|
||||
local self = BASE:Inherit( self, IDENTIFIABLE:New( PositionableName ) )
|
||||
|
||||
self.PositionableName = PositionableName
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -53,12 +54,12 @@ end
|
||||
-- @return Dcs.DCSTypes#Position The 3D position vectors of the POSITIONABLE.
|
||||
-- @return #nil The POSITIONABLE is not existing or alive.
|
||||
function POSITIONABLE:GetPositionVec3()
|
||||
self:F2( self.PositionableName )
|
||||
self:E( self.PositionableName )
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local PositionablePosition = DCSPositionable:getPosition()
|
||||
local PositionablePosition = DCSPositionable:getPosition().p
|
||||
self:T3( PositionablePosition )
|
||||
return PositionablePosition
|
||||
end
|
||||
@@ -110,6 +111,27 @@ function POSITIONABLE:GetPointVec2()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns a POINT_VEC3 object indicating the point in 3D of the POSITIONABLE within the mission.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE self
|
||||
-- @return Core.Point#POINT_VEC3 The 3D point vector of the POSITIONABLE.
|
||||
-- @return #nil The POSITIONABLE is not existing or alive.
|
||||
function POSITIONABLE:GetPointVec3()
|
||||
self:F2( self.PositionableName )
|
||||
|
||||
local DCSPositionable = self:GetDCSObject()
|
||||
|
||||
if DCSPositionable then
|
||||
local PositionableVec3 = self:GetPositionVec3()
|
||||
|
||||
local PositionablePointVec3 = POINT_VEC3:NewFromVec3( PositionableVec3 )
|
||||
|
||||
self:T2( PositionablePointVec3 )
|
||||
return PositionablePointVec3
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
--- Returns a random @{Dcs.DCSTypes#Vec3} vector within a range, indicating the point in 3D of the POSITIONABLE within the mission.
|
||||
-- @param Wrapper.Positionable#POSITIONABLE self
|
||||
|
||||
Reference in New Issue
Block a user