diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 31b286aa3..4a5d26e22 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -1168,6 +1168,9 @@ do -- COORDINATE -- @param #COORDINATE self -- @return #number The y coordinate. function COORDINATE:GetY() + if self:IsInstanceOf("POINT_VEC2") then + return self.z + end return self.y end @@ -1192,7 +1195,11 @@ do -- COORDINATE -- @param #number y The y coordinate. -- @return #COORDINATE function COORDINATE:SetY( y ) - self.y = y + if self:IsInstanceOf("POINT_VEC2") then + self.z = y + else + self.y = y + end return self end @@ -1289,7 +1296,11 @@ do -- COORDINATE -- @param #number y The y coordinate value to add to the current y coordinate. -- @return #COORDINATE function COORDINATE:AddY( y ) - self.y = self.y + y + if self:IsInstanceOf("POINT_VEC2") then + return self:AddZ(y) + else + self.y = self.y + y + end return self end diff --git a/Moose Development/Moose/Core/Zone_Detection.lua b/Moose Development/Moose/Core/Zone_Detection.lua index 06c9cdeae..8c05919c9 100644 --- a/Moose Development/Moose/Core/Zone_Detection.lua +++ b/Moose Development/Moose/Core/Zone_Detection.lua @@ -202,4 +202,3 @@ function ZONE_DETECTION:IsVec3InZone( Vec3 ) return InZone end - diff --git a/docs/archive/classes-core.md b/docs/archive/classes-core.md index 2bf02a4fb..0fe685d15 100644 --- a/docs/archive/classes-core.md +++ b/docs/archive/classes-core.md @@ -169,7 +169,7 @@ Defines an extensive API to manage 3D points in the DCS World 3D simulation spac **Features:** * Provides a COORDINATE class, which allows to manage points in 3D space and perform various operations on it. - * Provides a POINT_VEC2 class, which is derived from COORDINATE, and allows to manage points in 3D space, but from a + * Provides a COORDINATE class, which is derived from COORDINATE, and allows to manage points in 3D space, but from a Lat/Lon and Altitude perspective. * Provides a POINT_VEC3 class, which is derived from COORDINATE, and allows to manage points in 3D space, but from a X, Z and Y vector perspective.