Difference between revisions of "LlTargetOffsetOmega"

From Second Life Wiki
Jump to: navigation, search
m (Oops, forgot to delete some stuff)
m
Line 35: Line 35:
 
|also_articles
 
|also_articles
 
|notes=Use {{LSLG|llVecNorm}} on '''axis''' so that '''spinrate''' actually represents the rate of rotation.
 
|notes=Use {{LSLG|llVecNorm}} on '''axis''' so that '''spinrate''' actually represents the rate of rotation.
|cat1=Physics
+
|cat1
|cat2=Effects
+
|cat2
 
|cat3
 
|cat3
 
|cat4
 
|cat4
 
}}
 
}}

Revision as of 08:24, 31 August 2007

Emblem-important-yellow.png LSL Feature Request
The described function does not exist. This article is a feature request.

Summary

Function: llTargetOffsetOmega( vector axis, float spinrate, float gain, vector offset );
REQUEST Function ID
0.0 Forced Delay
10.0 Energy

Rotates the object around axis passing through offset 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
• vector offset offset from the center of the prim translates the axis

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

TODO: Not really sure about this - I suppose that the offset could be relative to various coordinate systems.

  • 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.
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, <1.0, 2.0, 3.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 llTargetOffsetOmega( vector axis, float spinrate, float gain, vector offset );