llSetPos
LSLvoid llSetPos(vector pos)
If the object is not physical, this function sets the position of the prim.\ If the script is in a child prim, Position is treated as root relative and the link-set is adjusted.\ If the prim is the root prim, the entire object is moved (up to 10m) to Position in region coordinates.
Parameters
| Type | Name | What it does |
|---|---|---|
| vector | pos | The target position: region metres for a root prim, root-relative for a child. |
Example
default
{
touch_start(integer n)
{
// Rise 2 m, then come back down.
vector here = llGetPos();
llSetPos(here + <0, 0, 2>);
llSleep(2.0);
llSetPos(here);
}
}Move further than 10 m in one go
llSetRegionPos(<128, 128, 40>);
Sleeps
0.2s
Energy
10
The Linden Scripting Library — what every SL-compatible grid provides.
More in LSL
void llMessageLinked(integer linknum, integer num, string str, string id)
list llGetAgentList(integer scope, list options)
void llResetAnimationOverride(string anim_state)
void llSetTexture(string texture, integer face)
vector llGetRegionSunDirection()
string llIntegerToBase64(integer number)
float llGetRegionTimeDilation()
void llSetScriptState(string name, integer run)