LlSetPos
From Second Life Wiki
| Languages: |
English • Deutsch • Español • ελληνικά • Français • עברית • Italiano • 日本語 • 한국어 • Nederlands • Magyar • Norsk • Dansk • Svenska • Türkçe • Polski • Português • Русский • украї́нська • 中文(简体) • 中文(繁體) |
| Volunteer translated pages are linked in blue, Google translated pages are linked in grey. Learn how to provide volunteer translations. | |
| LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Tutorials |
Contents |
Summary
Function: llSetPos( vector pos );| 58 | Function ID |
| 0.2 | Delay |
| 10.0 | Energy |
Moves the object or primitive towards pos without using physics.
| • vector | pos | – | position in region or local coordinates depending on the situation (see #Specification). |
Movement is capped to 10m per call for unattached root prims.[1]
Specification
Coordinate Frame
- Root prims (or single prim objects)
- Attached
- pos is a local coordinate relative to the attach point.
- Not attached
- pos is a region coordinate.
- Attached
- Child prims (non root prims)
- pos is a local coordinate relative to the root prim.
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.
- This function does not work for physical objects. Use llMoveToTarget instead.
Examples
//Move the object up 1m when someone touches it. default { touch_start(integer i) { llSetPos(llGetPos() + <0,0,1>); } }
Notes
Multiple movement commands can be chained together with llSetPrimitiveParams and PRIM_POSITION. The advantage of doing this is that the script only sleeps once per function call instead of once per movement.
See Also
Functions
| • | llGetLocalPos | – | Returns the prim's local position if it is attached or non-root (otherwise it returns the global position) | |
| • | llGetRootPosition | – | Gets the root prims position | |
| • | llGetPos | – | Returns the prim's global position, even if it is attached or non-root |
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.

