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

Syntax

void llSetForce( vector force, integer local );

Forced delay: 0.0 seconds. Energy: 10.0.

Parameters

vector force
directional force
integer local (boolean)
boolean, if TRUE force is treated as a local directional vector, if FALSE force is treated as a region directional vector

Continuous force. llApplyImpulse has instantaneous push.

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

//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!
    }
}

See also

Functions