Merge remote-tracking branch 'origin/develop' into branch

# Conflicts:
#	Moose Development/Moose/Core/Fsm.lua
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Modules_local.lua
This commit is contained in:
Applevangelist
2025-11-13 14:09:12 +01:00
23 changed files with 3702 additions and 113 deletions
+17
View File
@@ -1164,6 +1164,23 @@ function GROUP:GetVec3()
return nil
end
--- Returns the current {@Core.Vector#VECTOR} of the first Unit in the GROUP.
-- @param #GROUP self
-- @return Core.Vector#VECTOR Vector of the first Unit of the GROUP or nil if cannot be found.
function GROUP:GetVector()
-- Get first unit.
local unit=self:GetUnit(1)
if unit then
local vector=unit:GetVector()
return vector
end
self:E("ERROR: Cannot get Vector of group "..tostring(self.GroupName))
return nil
end
--- Returns the average Vec3 vector of the Units in the GROUP.
-- @param #GROUP self
-- @return DCS#Vec3 Current Vec3 of the GROUP or nil if cannot be found.
@@ -219,6 +219,25 @@ function POSITIONABLE:GetOrientationZ()
end
end
--- Returns the vectors of the orientation of the object:
-- X is the orientation parallel to the movement of the object, Z perpendicular and Y vertical orientation.
-- @param #POSITIONABLE self
-- @return Core.Vector#VECTOR X orientation, i.e. parallel to the direction of movement.
-- @return Core.Vector#VECTOR Y orientation, i.e. vertical.
-- @return Core.Vector#VECTOR Z orientation, i.e. perpendicular to the direction of movement.
function POSITIONABLE:GetOrientationVectors()
local position = self:GetPosition()
if position then
local vecx=VECTOR:NewFromVec(position.x)
local vecy=VECTOR:NewFromVec(position.y)
local vecz=VECTOR:NewFromVec(position.z)
return vecx, vecy, vecz
else
BASE:E( { "Cannot GetOrientation", Positionable = self, Alive = self:IsAlive() } )
return nil, nil, nil
end
end
--- Returns the @{DCS#Position3} position vectors indicating the point and direction vectors in 3D of the POSITIONABLE within the mission.
-- @param #POSITIONABLE self
-- @return DCS#Position The 3D position vectors of the POSITIONABLE.
@@ -286,6 +305,27 @@ function POSITIONABLE:GetVec2()
return nil
end
--- Returns the @{Core.Vector#VECTOR} indicating the 3D position of the object on the map.
-- @param #POSITIONABLE self
-- @return Core.Vector#VECTOR The 3D vector.
function POSITIONABLE:GetVector()
local DCSPositionable = self:GetDCSObject()
if DCSPositionable then
local Vec3 = DCSPositionable:getPoint() -- DCS#Vec3
local vector=VECTOR:NewFromVec(Vec3)
return vector
end
self:E( { "Cannot GetVec2", Positionable = self, Alive = self:IsAlive() } )
return nil
end
--- Returns a COORDINATE object indicating the point in 2D of the POSITIONABLE within the mission.
-- @param #POSITIONABLE self
-- @return Core.Point#COORDINATE The 3D point vector of the POSITIONABLE.
@@ -914,6 +954,24 @@ function POSITIONABLE:GetVelocityVec3()
return nil
end
--- Returns the velocity vector.
-- @param #POSITIONABLE self
-- @return Core.Vector#VECTOR The velocity vector or `nil` if the object does not exist.
function POSITIONABLE:GetVelocityVector()
local DCSPositionable = self:GetDCSObject()
if DCSPositionable and DCSPositionable:isExist() then
local vec3 = DCSPositionable:getVelocity()
local vector=VECTOR:NewFromVec(vec3)
return vector
end
BASE:E( { "Cannot GetVelocityVector", Positionable = self, Alive = self:IsAlive() } )
return nil
end
--- Get relative velocity with respect to another POSITIONABLE.
-- @param #POSITIONABLE self
-- @param #POSITIONABLE Positionable Other POSITIONABLE.