Difference between revisions of "LlApplyRotationalImpulse"

From Second Life Wiki
Jump to navigation Jump to search
m (Pointing out, that function does not work on attachments.)
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{LSL_Function|func_id=73|func_sleep=0.0|func_energy=10.0|func=llApplyRotationalImpulse|sort=ApplyRotationalImpulse
{{LSL_Function
|inject-2={{LSL_Function/force|force|local=local}}{{LSL_Function/physical}}
|func_id=73|func_sleep=0.0|func_energy=10.0
|func=llApplyRotationalImpulse
|p1_type=vector|p1_name=force
|p1_type=vector|p1_name=force
|p2_type=integer|p2_name=local|p2_desc=If {{LSLG|TRUE}}, '''force''' is treated as a {{LSLG|local vector}} instead of {{LSLG|global vector}}.
|p2_type=integer|p2_subtype=boolean|p2_name=local
|func_desc=Applies rotational impulse to object
|func_desc=Applies rotational impulse to object.
|return_text|spec|caveats|examples|helpers|related|also|notes}}[[Category:LSL_Physics]][[Category:LSL_Stub]]
|func_footnote
|return_text
|spec
|caveats=
* It does '''not''' work on attachments.
|constants
|examples=<source lang="lsl2">
default
{
    state_entry()
    {
        llApplyRotationalImpulse(<0,5,0>,TRUE); //Rotates object.
    }
}
</source>
|helpers
|also_functions={{LSL DefineRow||[[llApplyImpulse]]}}
{{LSL DefineRow||[[llSetAngularVelocity]]}}
|also_events
|also_tests
|also_articles
|notes
|permission
|negative_index
|cat1=Physics
|cat2=Movement
|cat3
|cat4
}}

Latest revision as of 11:54, 30 March 2018

Summary

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

Applies rotational impulse to object.

• vector 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

Examples

default
{
    state_entry()
    {
        llApplyRotationalImpulse(<0,5,0>,TRUE); //Rotates object.
    }
}

See Also

Functions

•  llApplyImpulse
•  llSetAngularVelocity

Deep Notes

Signature

function void llApplyRotationalImpulse( vector force, integer local );