AWACS - some additions

This commit is contained in:
Applevangelist
2022-07-09 14:52:49 +02:00
parent 5f8a0643f4
commit 18dcd0a5d2
2 changed files with 43 additions and 38 deletions

View File

@@ -825,7 +825,11 @@ do -- COORDINATE
-- @param #COORDINATE TargetCoordinate The target COORDINATE.
-- @return DCS#Vec3 DirectionVec3 The direction vector in Vec3 format.
function COORDINATE:GetDirectionVec3( TargetCoordinate )
return { x = TargetCoordinate.x - self.x, y = TargetCoordinate.y - self.y, z = TargetCoordinate.z - self.z }
if TargetCoordinate then
return { x = TargetCoordinate.x - self.x, y = TargetCoordinate.y - self.y, z = TargetCoordinate.z - self.z }
else
return { x=0,y=0,z=0}
end
end