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



Introduced in

Version:1.00

Description

Description:Returns an object's offset from the specified world position, taking into account the object origin and direction.
The world position specifies the terrain at that location, so in case that position is covered in water, the returned z-value will change with the tides/waves.

Syntax

Syntax:object worldToModel worldPos
Parameters:
Return Value:Array - offset in [x,y,z]

Examples

Examples:If the player is positioned at [1234,5678,0] and pointed North, the command would return [-1234,-5678,0]:
_offset = player worldToModel[0,0,0];
Returns the offset of obj1, in relation to the player:
_offset = player worldToModel (getPos obj1);

Additional Information

See also: modelToWorld, worldToModelASL2
Multiplayer:
Problems:

Notes