Skip to content
lsl.devlsl.devLSL Dev

llSetForceAndTorque

function
Function syntax
llSetForceAndTorque(
  1. vector force,// Directional linear force vector.
  2. vector torque,// Torque rotational force vector.
  3. 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)

How to use
llSetForceAndTorque(ZERO_VECTOR, ZERO_VECTOR, 0);
  • If either value is 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.)
Example 1
default
{
touch_start(integer total_number)
{
llSetForceAndTorque( <0.0,0.0,5.0>, <1.0,0.0,0.0>, FALSE );
}
}
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.