|LSL Portal||Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials|
The integer constant PRIM_POSITION has the value 6
PRIM_POSITION is used to get or set the prim's position.
|• vector||position||–||position in region or local coordinates depending upon the situation|
- Depending upon the situation local coordinates or region coordinates, See llSetPos#Specification for details. may need to be in
- The range the prim can move is limited if it is an unattached root prim. The distance is capped to 10m per PRIM_POSITION call. See WarpPos. This is a very special case. Do not rely on rule duplication of other flags - the results are undefined, and things will break in the future.
- Moving avatars with PRIM_POSITION
- Moving the prim the avatar sat upon does not move the avatar.
- Moving an avatar does not move the prim they sat upon.
- Sit-target coordinates do not easily map to prim coordinates, use UpdateSitTarget.
- If you have explicitally set your object as "static obstacle" for pathfinding , the function will fail with the error in the debug channel : "Unable to set prim position or scale: object contributes to the navmesh."
- If is greater than 54 meters away from the center, the repositioning will silently fail.
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>]);
Returns the list [ vector ]
|• vector||position||–||position in region coordinates|
CaveatsAll Issues ~ Search JIRA for related Bugs
integer PRIM_POSITION = 6;