pXent_makelocal ( entity, VECTOR* inGlobal, VECTOR* outLocal );

This function converts a global position vector to a local position vector which is relative to the entity's position / orientation.

Parameters:

entity registered Entity pointer (Actor)
inGlobal global position vector
outLocal local position vector relative to the object's position / orientation.


Returns:

local position vector relative to the object's position / orientation in outLocal
1 if successful, 0 otherwise.

Speed:

Fast

Example:

pXent_makelocal(my, my.x, temp); // output in temp

See also:

pXent_getvelocity