# llSetForce

*LSL function*

```lsl
void llSetForce(vector force, integer is_local);
```

- `vector force`: Directional force vector to apply.
- `integer is_local`: Boolean. If TRUE, force is treated as a local vector; if FALSE, as a global region vector.

- Energy: 10

Applies a constant linear force to a physical object. If local is TRUE, force is applied relative to local coordinates; if FALSE, applied relative to region coordinates.

Applies force to the object (if the object is physical)

Continuous force. [llApplyImpulse](/functions/llApplyImpulse/) has instantaneous push.

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

## Caveats

Only works on physical objects and attachments (non-physical as well as physical). Used on an attachment, it will apply the force to the avatar.

## Examples

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

```lsl
//A simple rocket script. Launches object up when touched.
//Sit on it for an interesting ride!
default
{
    touch_start(integer i)
    {
        llSetStatus(STATUS_PHYSICS, TRUE);
        llSetForce(<0,0,0x7FFFFFFF>, 0);  //FLY!
    }
}
```

</details>

## See also

### Functions

- [llSetForceAndTorque](/functions/llSetForceAndTorque/)
- [llSetTorque](/functions/llSetTorque/)
- [llApplyImpulse](/functions/llApplyImpulse/) — Instantaneous force

---

*Source: [LlSetForce](https://wiki.secondlife.com/wiki/LlSetForce) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetForce (revision 1214001, 2023-05-31), Template:LSL Function/force (revision 1168796, 2012-06-11) and Template:LSL Function/physical (revision 1168828, 2012-06-11), CC BY-SA 3.0.*

---

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