Skip to content

llSetForce

void llSetForce(vector Force, integer Local)

Sets Force on object, in object-local coordinates if Local == TRUE (otherwise, the region reference frame is used).

Only works on physical objects.

Parameters
Force(vector)
Directional force.
Local(integer)
Boolean, if TRUE uses local axis, if FALSE uses region axis.
  • Only works on physical objects and attachments (non-physical as well as physical)
  • When used on an attachment, it will apply the force to the avatar
  • This applies continuous force; use llApplyImpulse for instantaneous push
// 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!
}
}