DCS func getPosition

From DCS World Wiki - Hoggitworld.com
Revision as of 00:12, 12 April 2018 by Grimes (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Scripting Root

Envrioment: Mission Scripting
Function: getPosition Added with: 1.2.0
Member Of: Object, Spot
Syntax: vec3 Object.getPosition(Class Self )
Description: Returns a pos3 table of the objects current position and orientation in 3D space. X, Y, Z values are unit vectors defining the objects orientation. Coordinates are dependent on the position of the maps origin. In the case of the Caucuses theater, the origin is located in the Crimean region of the map.

Function also works with Unit, Weapon, Static Object, Scenery Object, Airbase


Return Value: vec3
Return Example: Position 3 is a table consisting of the point and orientation tables.
Position3 = {   p = Vec3,
                x = Vec3,
                y = Vec3,
                z = Vec3 }
Examples:
Related Functions: Object Functions: isExist, destroy, getCategory, getTypeName, getDesc, hasAttribute, getName, getPoint, getPosition, getVelocity, inAir
Notes: