Difference between revisions of "DCS func getPoint"
From DCS World Wiki - Hoggitworld.com
m (1 revision imported) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 21: | Line 21: | ||
|rtnExample= | |rtnExample= | ||
Vec3 = { | Vec3 = { | ||
− | x = Distance, | + | x = Distance North-south, |
− | y = Distance, | + | y = Distance above height 0, |
− | z = Distance | + | z = Distance East-West |
} | } | ||
Line 42: | Line 42: | ||
[[DCS_Class_Spot|'''Spot Functions:''']] {{listofScriptingSpotFuncs}} | [[DCS_Class_Spot|'''Spot Functions:''']] {{listofScriptingSpotFuncs}} | ||
− | |examples= | + | |examples= The following prints the target coordinates to the log. |
+ | local targetCoord = Unit.getByName('killMeNow'):getPoint() | ||
+ | env.info('The World Coordinates of the target are: X: ' .. targetCoord.x .. ' Y: ' .. targetCoord.y .. ' Z: ' .. targetCoord.z) | ||
− | |notes= | + | |notes= '''Remember''' that the Vec3 x, y and z do ''not'' follow the normal intuitive orientation conventions. 'x' is the north-south axis, 'z' is the east-west axis, and 'y' is the vertical/height axis! Also, Vec3 x & y to ''not'' correlate to Vec2 x & y! |
}} | }} | ||
[[Category:Class Functions|getPoint]] | [[Category:Class Functions|getPoint]] | ||
+ | [[Category:Game Patch 1.2.0|getPoint]] |