Difference between revisions of "LlSetPos"

From Second Life Wiki
Jump to navigation Jump to search
Line 3: Line 3:
|func=llSetPos
|func=llSetPos
|p1_type=vector|p1_name=pos
|p1_type=vector|p1_name=pos
|func_desc=Moves the object or primitive towards the specified location without using physics. If the script is attached to a linked prim that is not root, the function moves the prim relative to the root.
|func_desc=Moves the object or primitive towards the specified location without using physics.  
 
|func_footnote=Movement is capped to 10m per call for unattached root prims.
For an unlinked prim, or the root prim, this movement is in [[Viewer coordinate frames#Region|region]] coordinates, however, for a linked prim (not the root) the coordinates are in the frame of the root prim ([[Viewer coordinate frames#Local|local]]). You can get a linked prim's position relative to the root prim with [[llGetLocalPos]]. There is no llSetLocalPos because this function does that if it is in a linked prim (not the root).
|spec=
|func_footnote=Movement is capped to 10m per call.
*Root prims (or single prim objects)
|spec
**Not attached
|caveats
***'''pos''' is a [[Viewer coordinate frames#Region|region coordinate]].
**Attached
***'''pos''' is a [[Viewer coordinate frames#local|local coordinate]]relative to the attach point.
*Child prims (non root prims)
**'''pos''' is a [[Viewer coordinate frames#local|local coordinate]] relative to the root prim.
|caveats=
*Because of the intermixing of local and regional coordinates with this function, when a prims position is wanted it is best to use [[llGetLocalPos]].
|constants
|constants
|examples
|examples
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetPos]]|[[llGetLocalPos]]|}}
|also_functions={{LSL DefineRow||[[llGetLocalPos]]|Returns the prim's local position if it is attached or non-root (otherwise it returns the global position)}}
{{LSL DefineRow||[[llGetPos]]|Returns the prim's global position, even if it is attached or non-root}}
|also_tests
|also_tests
|also_events
|also_events

Revision as of 07:10, 20 March 2007

Summary

Function: llSetPos( vector pos );
0.2 Forced Delay
10.0 Energy

Moves the object or primitive towards the specified location without using physics.

• vector pos

Movement is capped to 10m per call for unattached root prims.

Specification

Caveats

  • This function causes the script to sleep for 0.2 seconds.
  • Because of the intermixing of local and regional coordinates with this function, when a prims position is wanted it is best to use llGetLocalPos.

Examples

See Also

Functions

•  llGetLocalPos Returns the prim's local position if it is attached or non-root (otherwise it returns the global position)
•  llGetPos Returns the prim's global position, even if it is attached or non-root

Deep Notes

Signature

function void llSetPos( vector pos );