# llSetPos

*LSL function*

```lsl
void llSetPos(vector pos);
```

- `vector pos`: Position vector to move to (in region coordinates, or local coordinates if in a child prim).

- Delay: 0.2 s
- Energy: 10

Moves the object or primitive towards **pos** without using physics.

Movement is capped to 10m per call for unattached root prims.[^wiki-08f33f]

[^wiki-08f33f]: Unless you exploit the undocumented [warpPos](https://wiki.secondlife.com/wiki/warpPos) bug.

```lsl title="How to use" frame="terminal"
llSetPos(ZERO_VECTOR);
```

## Specification

This function is available for nonphysical root prims and all child prims. It has no effect on the root prim if the object is physical.

##### Coordinate Frame

- Root prims (or single prim objects)
- Attached
- **pos** is a [local coordinate](https://wiki.secondlife.com/wiki/Viewer_coordinate_frames#local) relative to the attach point.
- Not attached
- **pos** is a [region coordinate](https://wiki.secondlife.com/wiki/Viewer_coordinate_frames#region).
- Child prims (non root prims)
- **pos** is a [local coordinate](https://wiki.secondlife.com/wiki/Viewer_coordinate_frames#local) 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](/functions/llGetLocalPos/).
- This function does not work in the root prim of physical objects. Use a physical function like [llMoveToTarget](/functions/llMoveToTarget/) instead.
- 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."
- The function cannot move a world object below the region ground level, and the midpoint of the root will be snapped to the ground instead.

## Examples

<details open>
<summary>Example 1</summary>

:::note
This function has a movement cap of 10m and a time delay of 0.2 seconds per call. Please consider using [llSetRegionPos](/functions/llSetRegionPos/) and/or [llSetLinkPrimitiveParamsFast](/functions/llSetLinkPrimitiveParamsFast/) instead.
:::

```lsl collapse={7-16}
//Move the object up 1m when someone touches it.
default {
     touch_start(integer i) {
          llSetPos(llGetPos() + <0,0,1>);
     }
}
// to bypass the small movement bug use this
// - created by Madpeter Zond
// notes: it does not check if the movement would go out of limit range for linked prims
llSetLocalPos(vector offset)
{
    vector save = offset;
    if(offset.x < 0.0) offset.x -= 1;
    else offset.x += 1;
    if(offset.y < 0.0) offset.y -= 1;
    else offset.y += 1;
    if(offset.z < 0.0) offset.z -= 1;
    else offset.z += 1;
    llSetPos(offset);
    llSetPos(save);
}
```

</details>

## Notes

Multiple movement commands can be chained together with [llSetPrimitiveParams](https://wiki.secondlife.com/wiki/LlSetPrimitiveParams) and [PRIM_POSITION](/constants/PRIM_POSITION/). The advantage of doing this is that the script only sleeps once per function call instead of once per movement.

## Known issues

From the issue templates included by the wiki article:

- SVC-1945 (bug): llSetPos() doesn't change position for small vectors when called in attachments on Havok4 unless interacted with

## See also

### Functions

- [llSetRegionPos](/functions/llSetRegionPos/) — Sets position of object to any position within the region.
- [llGetLocalPos](/functions/llGetLocalPos/) — Returns the prim's local position if it is attached or non-root (otherwise it returns the global position)
- [llGetRootPosition](/functions/llGetRootPosition/) — Gets the root prims position
- [llGetPos](/functions/llGetPos/) — Returns the prim's global position, even if it is attached or non-root

---

*Source: [LlSetPos](https://wiki.secondlife.com/wiki/LlSetPos) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetPos (revision 1218846, 2026-05-19), Template:Issues/SVC-1945 (revision 429933, 2009-07-11) and Template:LSL Function/position (revision 1169387, 2012-06-18), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llSetPos/
