Difference between revisions of "LlSetTorque"

From Second Life Wiki
Jump to navigation Jump to search
m (Replaced old <LSL> block with <source lang="lsl2">)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{LSL Function
{{LSL Function
|inject-2={{LSL_Function/force|torque|local=local}}{{LSL_Function/physical}}
|func_id=74
|func_id=74
|func_sleep=0.0
|func_sleep=0.0
|func_energy=10.0
|func_energy=10.0
|func=llSetTorque
|func=llSetTorque
|p1_type=vector
|p1_type=vector|p1_name=torque
|p1_name=torque
|p2_type=integer|p2_subtype=boolean|p2_name=local
|p2_type=integer
|func_desc=Sets the torque of object (if the script is physical)
|p2_name=local
|spec
|func_desc=sets the torque of object, in local coords if local == TRUE (if the script is physical)
|caveats
|}}
|constants
[[Category:LSL Functions|Set Torque]]
|examples=<source lang="lsl2">
[[Category:LSL Stub]]
default
{
    touch_start(integer total_number)
    {
        llSetTorque(<0,10,0>,1);
                  //X  Y Z  Local
    }
}
</source>
 
|helpers
|also_functions={{LSL DefineRow||[[llSetForceAndTorque]]|}}
{{LSL DefineRow||[[llSetForce]]|}}
|also_tests
|also_events
|also_articles
|notes
|cat1=Physics
|cat2=Movement
|haiku={{Haiku|Spinning, all a blur...|Small moment of inertia.|They say torque is cheap.}}
|cat3
|cat4
}}

Latest revision as of 12:59, 22 January 2015

Summary

Function: llSetTorque( vector torque, integer local );

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

• vector torque
• integer local boolean, if TRUE uses the local axis, if FALSE uses the region region axis

Caveats

Examples

default
{
    touch_start(integer total_number)
    {
        llSetTorque(<0,10,0>,1);
                   //X  Y Z  Local
    }
}

See Also

Functions

•  llSetForceAndTorque
•  llSetForce

Deep Notes

Search JIRA for related Issues

Signature

function void llSetTorque( vector torque, integer local );

Haiku

Spinning, all a blur...
Small moment of inertia.
They say torque is cheap.