Difference between revisions of "LlTargetOmega"

From Second Life Wiki
Jump to navigation Jump to search
(cite the jiras you mention, i'm moving it to the discussion page.)
Line 7: Line 7:
|p2_type=float|p2_name=spinrate|p2_desc=rate of rotation in radians per second
|p2_type=float|p2_name=spinrate|p2_desc=rate of rotation in radians per second
|p3_type=float|p3_name=gain|p3_desc=needs to be non-zero
|p3_type=float|p3_name=gain|p3_desc=needs to be non-zero
NOTE: Currently llTargetOmega is not performing properly, especially when involved in an avatar attachment.  Several "work arounds" have been published, none of which provide consistent results.  Severl JIRA reports have been filed over periods of several months.  Linden Lab has reported looking into the issue, but thus far the problem remains. llTargetOmega cannot currently be relied upon to rotate avatar attachments properly, and exhibits inconsistent results on non-attached objects.
|func_footnote
|func_footnote
|func_desc=Rotates the object around '''axis''' at '''spinrate''' * {{LSLG|llVecMag}}('''axis''') in radians per second with strength '''gain'''.
|func_desc=Rotates the object around '''axis''' at '''spinrate''' * {{LSLG|llVecMag}}('''axis''') in radians per second with strength '''gain'''.

Revision as of 06:24, 25 February 2008

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

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.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>//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);</lsl>

Notes

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

Deep Notes

Search JIRA for related Issues

Tests

Signature

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