LlTargetOmega: Difference between revisions

From Second Life Wiki
Jump to navigation Jump to search
Strife Onizuka (talk | contribs)
No edit summary
mNo edit summary
Line 22: Line 22:
**If the object is attached then it rotates around the attachment '''axis'''
**If the object is attached then it rotates around the attachment '''axis'''
*If the script is attached to a child prim, the prim rotates around the [[Viewer coordinate frames#Local|local]] '''axis'''
*If the script is attached to a child prim, the prim rotates around the [[Viewer coordinate frames#Local|local]] '''axis'''
**A Child prim can rotate around it's own '''axis''' while the entire object rotates around another '''axis'''.
**A Child prim can rotate around its own '''axis''' while the entire object rotates around another '''axis'''.
|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.
|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

Revision as of 17:36, 28 March 2007

Summary

Function: llTargetOmega( vector axis, float spinrate, float gain );
0.0 Forced Delay
10.0 Energy

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

Specification

Physics

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

Link Sets

  • If the script is attached to the root prim, the entire object rotates around the region axis
    • If the object is attached then it rotates around the attachment axis
  • If the script is attached to a child prim, the prim rotates around the local axis
    • A Child prim can rotate around its own axis while the entire object rotates around another axis.

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.

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

Signature

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