# llPushObject

*LSL function*

```lsl
void llPushObject(key target, vector impulse, vector ang_impulse, integer is_local);
```

- `key target`: UUID of the target avatar or object in the same region.
- `vector impulse`: Linear impulse vector representing the direction and force of the push.
- `vector ang_impulse`: Angular impulse vector representing the rotational force.
- `integer is_local`: Boolean. If TRUE, forces are applied relative to the target's local axes; if FALSE, relative to region axes.

- Energy: 10

Applies physical impulse (force) and ang_impulse (rotational force) to the specified target avatar or object.

Applies **impulse** and **ang_impulse** to object **target**

```lsl title="How to use" frame="terminal"
llPushObject(NULL_KEY, ZERO_VECTOR, ZERO_VECTOR, 0);
```

## Caveats

- Only works on land where Push is not restricted or where the script is owned by the land owner.
- If the land is owned by a group, the scripted object must be deeded to the same group.
- In no-push areas an object can only push its owner or itself.
- The effectiveness of Push is modulated by the amount of [script energy](https://wiki.secondlife.com/wiki/Energy) available.
- There is a [simplified code snippet](https://wiki.secondlife.com/wiki/LlPushObject/Havok4Implementation) describing how Push is implemented in the Havok4 project and reveals some of the details of how the energy budget affects the final Push magnitude.
- **ang_impulse** is ignored when applying to agents or their attachments.
- [Energy](https://wiki.secondlife.com/wiki/Energy) is fully depleted by this function when either **impulse** or **ang_impulse** is nonzero. If **impulse** is nonzero, it will drain all energy in the object before **ang_impulse** is processed, causing the push to be purely linear.
- The push impact is diminished with distance by a factor of distance cubed.

## Examples

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

```lsl
// Pushes the collided object or avatar.
default
{
    collision_start(integer num_detected)
    {
        llPushObject(llDetectedKey(0),<0,0,100>, <0,0,100>, TRUE);
    }
}
```

</details>

---

*Source: [LlPushObject](https://wiki.secondlife.com/wiki/LlPushObject) on the Second Life Wiki. Content from the Second Life Wiki articles LlPushObject (revision 1216758, 2024-05-31) and Template:LSL Function/uuid (revision 1195911, 2015-03-21), CC BY-SA 3.0.*

---

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