mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Update Group.lua
- Added way to get the coordinate of the group
This commit is contained in:
parent
1b6945e0b0
commit
5f7a4f2bbb
@ -1221,7 +1221,14 @@ end
|
||||
-- @return Core.Point#COORDINATE The COORDINATE of the GROUP.
|
||||
function GROUP:GetCoordinate()
|
||||
|
||||
local Units = self:GetUnits() or {}
|
||||
-- First try to get the 3D vector of the group. This uses
|
||||
local vec3=self:GetVec3()
|
||||
if vec3 then
|
||||
local coord=COORDINATE:NewFromVec3(vec3)
|
||||
return vec3
|
||||
end
|
||||
|
||||
local Units = self:GetUnits() or {}
|
||||
|
||||
for _,_unit in pairs(Units) do
|
||||
local FirstUnit = _unit -- Wrapper.Unit#UNIT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user