From 5f7a4f2bbb36ad27d8e23a0520f466bae3e3dafc Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 28 Jan 2025 20:22:45 +0100 Subject: [PATCH] Update Group.lua - Added way to get the coordinate of the group --- Moose Development/Moose/Wrapper/Group.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Group.lua b/Moose Development/Moose/Wrapper/Group.lua index ef0561f84..8b4465f87 100644 --- a/Moose Development/Moose/Wrapper/Group.lua +++ b/Moose Development/Moose/Wrapper/Group.lua @@ -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