LlSetForceAndTorque
Looking for the current API? Open the llSetForceAndTorque reference →
Wiki description
Sets the force and torque of object (if the script is physical)
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
default
{
touch_start(integer total_number)
{
llSetForceAndTorque( <0.0,0.0,5.0>, <1.0,0.0,0.0>, FALSE );
}
}See also: functions
Shared wiki helpers
The original page also injects shared parameter notes, caveats or issue information through these helpers. Their conditional MediaWiki logic is not reproduced here; inspect the preserved helper source for additional material.
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:
{{#if:{{{local|}}}|
{{#ifeq:{{{local|}}}|*||
<!-- non-zero=* -->
{{#ifeq:{{{1|}}}|torque|
{{LSL_Function/boolean|{{{local|}}}|if=*
|th=uses the local axis
|td=uses the [[Viewer coordinate frames#Local|local axis]]
|fh=uses the region axis
|fd=uses the region [[Viewer coordinate frames#Region|region axis]]
|bool=*}}
|
{{LSL_Function/boolean|{{{local|}}}|if=*
|th={{{1|}}} is treated as a local directional vector
|td={{LSLP|{{{1|}}}}} is treated as a [[Viewer coordinate frames#Local|local]] directional vector
|fh={{{1|}}} is treated as a region directional vector
|fd={{LSLP|{{{1|}}}}} is treated as a [[Viewer coordinate frames#Region|region]] directional vector
|bool=*}}
}}
}}
}}
}}Template:LSL Function/physical
Original shared helper source (conditional wiki logic is not evaluated)
{{LSL Injection Test}}{{#if:
{{#vardefine:caveats|{{#var:caveats}}
*Only works in {{#if:{{{avatar|}}}|attachments and}} [[STATUS_PHYSICS|physics-enabled]] objects.}}
}}<noinclude>
{| {{Prettytable}}
|- {{Hl2}}
! #var
! value
|-
{{VarPair|caveats}}
|}
</noinclude>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.