Difference between revisions of "LlSetForceAndTorque"

From Second Life Wiki
Jump to navigation Jump to search
m (Replaced old <LSL> block with <source lang="lsl2">)
 
(One intermediate revision by one other user not shown)
Line 11: Line 11:
|spec
|spec
|caveats=
|caveats=
* If either value is [[ZERO_VECTOR]], the function eliminates both forces. Both values must be non-zero for this function to work.
* 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.)
|constants
|constants
|examples=
|examples=
<lsl>
<source lang="lsl2">
default
default
{
{
Line 22: Line 22:
     }
     }
}
}
</lsl>
</source>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llSetForce]]|}}
|also_functions={{LSL DefineRow||[[llSetForce]]|}}

Latest revision as of 13:42, 22 January 2015

Summary

Function: llSetForceAndTorque( vector force, vector torque, integer local );
0.0 Forced Delay
10.0 Energy

Sets the force and torque of object (if the script is physical)

• vector force directional force
• vector torque torque force
• integer local boolean, if TRUE force is treated as a local directional vector, if FALSE force is treated as a region directional vector

Caveats

  • Only works in physics-enabled objects.
  • 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

default
{
    touch_start(integer total_number)
    {
        llSetForceAndTorque( <0.0,0.0,5.0>, <1.0,0.0,0.0>, FALSE );
    }
}

See Also

Functions

•  llSetForce
•  llSetTorque

Deep Notes

Signature

function void llSetForceAndTorque( vector force, vector torque, integer local );