Skip to content
lsl.devlsl.devLSL Dev

llSetForce

function
Function syntax
llSetForce(
  1. vector force,// Directional force vector to apply.
  2. 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 has instantaneous push.

How to use
llSetForce(ZERO_VECTOR, 0);

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.

Example 1
//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!
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.