# llSetForceAndTorque

*LSL function*

```lsl
void llSetForceAndTorque(vector force, vector torque, integer is_local);
```

- `vector force`: Directional linear force vector.
- `vector torque`: Torque rotational force vector.
- `integer is_local`: Boolean. If TRUE, force and torque are treated as local vectors; if FALSE, as global region vectors.

- Energy: 10

Sets both the constant linear force and constant torque acting on a physical object. If local is TRUE, forces are applied in local coordinates; if FALSE, in global coordinates.

Sets the force and **torque** of object (if the script is physical)

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

## Caveats

- If either value is [ZERO_VECTOR](/constants/ZERO_VECTOR/), the function eliminates both forces. Both values must be non-zero for this function to work. (The workaround to this is setting both separately.)

## Examples

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

```lsl
default
{
    touch_start(integer total_number)
    {
        llSetForceAndTorque( <0.0,0.0,5.0>, <1.0,0.0,0.0>, FALSE );
    }
}
```

</details>

## See also

### Functions

- [llSetForce](/functions/llSetForce/)
- [llSetTorque](/functions/llSetTorque/)

---

*Source: [LlSetForceAndTorque](https://wiki.secondlife.com/wiki/LlSetForceAndTorque) on the Second Life Wiki. Content from the Second Life Wiki articles LlSetForceAndTorque (revision 1194492, 2015-01-22), 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/llSetForceAndTorque/
