Difference between revisions of "LlTargetOmega"

From Second Life Wiki
Jump to navigation Jump to search
Line 4: Line 4:
|func_energy=10.0
|func_energy=10.0
|func=llTargetOmega
|func=llTargetOmega
|p1_type=vector|p1_name=axis
|p1_type=vector|p1_name=axis|p1_desc=arbitrary axis to rotate the object around
|p2_type=float|p2_name=spinrate
|p2_type=float|p2_name=spinrate|p2_desc=rate of rotation in radians per second
|p3_type=float|p3_name=gain
|p3_type=float|p3_name=gain|p3_desc=needs to be non-zero
|func_footnote=Attempt to spin at spinrate with strength gain
|func_footnote=If the object is not physical then the effect is entirely client side.<br/>
|func_desc=Rotates the object at '''spinrate''' times the magnitude of '''axis''' in radians per second, with a rotational bias set by the '''axis''' parameter.
If the object is physical then the physical representation is updated regularly.
|func_desc=Rotates the object around '''axis''' at '''spinrate''' * {{LSLG|llVecMag}}('''axis''') in radians per second with strength '''gain'''.
|examples=<pre>//rotates the x axis once per second,
|examples=<pre>//rotates the x axis once per second,
//  rotates the y axis 3 times per second,  
//  rotates the y axis 3 times per second,  
Line 15: Line 16:
llTargetOmega(<1.0,3.0,0.5>,TWO_PI,1.0);</pre>
llTargetOmega(<1.0,3.0,0.5>,TWO_PI,1.0);</pre>
|spec
|spec
|caveats
|caveats=*If the object is not physical then the rotation is only a client side effect and avatars and objects may move around the object as if it were not rotating at all.
|constants
|constants
|helpers
|helpers
Line 22: Line 23:
|also_events
|also_events
|also_articles
|also_articles
|notes
|notes=Use {{LSLG|llVecNorm}} on '''axis''' so that '''spinrate''' actually represents the rate of rotation.
|cat1=Physics
|cat1=Physics
|cat2=Effects
|cat2=Effects

Revision as of 11:46, 21 February 2007

Summary

Function: llTargetOmega( vector axis, float spinrate, float gain );

Rotates the object around axis at spinrate * llVecMag(axis) in radians per second with strength gain.

• vector axis arbitrary axis to rotate the object around
• float spinrate rate of rotation in radians per second
• float gain needs to be non-zero

If the object is not physical then the effect is entirely client side.
If the object is physical then the physical representation is updated regularly.

Caveats

  • If the object is not physical then the rotation is only a client side effect and avatars and objects may move around the object as if it were not rotating at all.
All Issues ~ Search JIRA for related Bugs

Examples

//rotates the x axis once per second,
//  rotates the y axis 3 times per second, 
//  rotates the z axis once every two seconds.
//  combined the rate is about 3.20156 revolutions per second
llTargetOmega(<1.0,3.0,0.5>,TWO_PI,1.0);

Notes

Use llVecNorm on axis so that spinrate actually represents the rate of rotation.

Deep Notes

Search JIRA for related Issues

Signature

function void llTargetOmega( vector axis, float spinrate, float gain );