The integer constant PRIM_POSITION has the value 6
PRIM_POSITION is used to get or set the prim's position.
integer PRIM_POSITION = 6;
llSetPrimitiveParams([ ..., PRIM_POSITION, vector position, ... ]);
| vector | position | position in region or local coordinates depending upon the situation |
The same syntax applies to llSetLinkPrimitiveParams and llSetLinkPrimitiveParamsFast but with an additional prefixed link parameter in the function call.
Avatars sitting on the object can be moved with llSetLinkPrimitiveParams and PRIM_POSITION. This was originally a mis-feature but according to Andrew Linden LL has decided to support it.
The below example moves an avatar to x,y,z without moving the prim they are sitting on. If x,y,z is more than 54 meters away the call will silently fail. Remember x,y,z is in object relative coordinates just like any other linked prim in a set.
Avatars are always the last prims in the set, so llGetNumberOfPrims can be used for a single avatar sitting on a vehicle.
Example:
llSetLinkPrimitiveParams(llGetNumberOfPrims(), [PRIM_POSITION, <x,y,z>]);
llGetPrimitiveParams([ ..., PRIM_POSITION, ... ]);
Returns the list [ vector position ]
| vector | position | position in region coordinates |
The same syntax applies to llGetLinkPrimitiveParams, but with an additional prefixed link parameter in the function call.