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.)
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
{{LSL_Function
{{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_id=73|func_sleep=0.0|func_energy=10.0
|func=llApplyRotationalImpulse
|func=llApplyRotationalImpulse
|p1_type=vector|p1_name=force
|p1_type=vector|p1_name=force
|p2_type=integer|p2_name=local|p2_desc=boolean, 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.
|func_footnote
|func_footnote
|return_text
|return_text
|spec
|spec
|caveats
|caveats=
* It does '''not''' work on attachments.
|constants
|constants
|examples
|examples=<source lang="lsl2">
default
{
    state_entry()
    {
        llApplyRotationalImpulse(<0,5,0>,TRUE); //Rotates object.
    }
}
</source>
|helpers
|helpers
|also_functions=*{{LSLG|llApplyImpulse}}
|also_functions={{LSL DefineRow||[[llApplyImpulse]]}}
{{LSL DefineRow||[[llSetAngularVelocity]]}}
|also_events
|also_events
|also_tests
|also_tests
Line 20: Line 31:
|negative_index
|negative_index
|cat1=Physics
|cat1=Physics
|cat2
|cat2=Movement
|cat3
|cat3
|cat4=Stub
|cat4
}}
}}

Latest revision as of 11:54, 30 March 2018

Summary

Function: llApplyRotationalImpulse( vector force, integer local );

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

All Issues ~ Search JIRA for related Bugs

Examples

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

See Also

Functions

•  llApplyImpulse
•  llSetAngularVelocity

Deep Notes

Search JIRA for related Issues

Signature

function void llApplyRotationalImpulse( vector force, integer local );