Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:1.00

Description

Description:

Returns a world position (above ground level), relative to the object origin, and taking into account its direction.

An offset of [0,0,0] returns the current, absolute position, including any elevations (for example, when positioned on top of another object).

Syntax

Syntax:object modelToWorld offset
Parameters:
  • object: Object - Object to check.
  • offset: Array - Offset from the object origin in [x,y,z], where x = left / right, y = forward / back, z = up / down.
Return Value:PositionAGL - Position in world coordinates.

Examples

Examples:
From the player position and the direction the unit is facing, returns a position 5m to the left, 10m in front, and 1m above:
_worldPos= player modelToWorld [-5,10,1];
Places obj1 10m in front of the player:
obj1 setPos (player modelToWorld [0,10,0]);

Additional Information

See also: worldToModel, modelToWorldASL2
Multiplayer:
Problems:

Notes