LlSetPos

From Second Life Wiki

Jump to: navigation, search

Template:Needs Translation/LSL/es Template:Needs Translation/LSL/el Template:Needs Translation/LSL/he Template:Needs Translation/LSL/it Template:Needs Translation/LSL/ko Template:Needs Translation/LSL/nl Template:Needs Translation/LSL/hu Template:Needs Translation/LSL/no Template:Needs Translation/LSL/da Template:Needs Translation/LSL/sv Template:Needs Translation/LSL/tr Template:Needs Translation/LSL/pl Template:Needs Translation/LSL/pt Template:Needs Translation/LSL/ru Template:Needs Translation/LSL/uk Template:Needs Translation/LSL/zh-Hans Template:Needs Translation/LSL/zh-Hant

Contents

Summary

Buggy
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

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.

Important Issues

~ Search JIRA for related Bugs
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    llSetPos() doesn't change position for small vectors when called in attachments on Havok4 unless interacted with

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

Deep Notes

Issues

~ Search JIRA for related Issues
Bug - A problem which impairs or prevents the functions of the product. Open - The issue is open and ready for the assignee to start work on it.    llSetPos() doesn't change position for small vectors when called in attachments on Havok4 unless interacted with

Footnotes

  1. ^ Unless you exploit the undocumented warpPos bug.
This article wasn't helpful for you? Maybe the related article at the LSL Wiki is able to bring enlightenment.
Personal tools
In other languages