llSetForceAndTorque
function
Function syntax
llSetForceAndTorque(vector force,// Directional linear force vector.vector torque,// Torque rotational force vector.integer is_local// Boolean. IfTRUE, force and torque are treated as local vectors; ifFALSE, 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)
llSetForceAndTorque(ZERO_VECTOR, ZERO_VECTOR, 0);Caveats
Section titled “Caveats”- 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.)
Examples
Section titled “Examples”Example 1
default{ touch_start(integer total_number) { llSetForceAndTorque( <0.0,0.0,5.0>, <1.0,0.0,0.0>, FALSE ); }}See also
Section titled “See also”Functions
Section titled “Functions”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.