Difference between revisions of "LlTargetOffsetOmega"

From Second Life Wiki
Jump to: navigation, search
(Copied original llTargetOmega)
 
(Added the extension, that allows the center of rotation to be offset from the center of the prim)
Line 1: Line 1:
 +
{{LSL_Function|func_id|mode=request|func_sleep=0.1|func_energy=10.0|func=llTeleportAgent|sort=TeleportAgent|p1_type=key|p1_name=id|p2_type=string|p2_name=simname|p3_type=vector|p3_name=pos|p4_type=vector|p4_name=look_at|func_desc=Teleports agent id to location pos.|return_text|spec|caveats=Agent must be the script owner or must be on script owner's land.|examples|helpers|related|also|notes=This would be extremely useful in complex builds and HUDS. NOTE: look_at is included to match llMapDestination's look_at possible future functionality, which currently does nothing.}}
 +
 
{{LSL Function
 
{{LSL Function
|func_id=133
+
|func_id
 +
|mode=request
 
|func_sleep=0.0
 
|func_sleep=0.0
 
|func_energy=10.0
 
|func_energy=10.0
|func=llTargetOmega
+
|func=llTargetOffsetOmega
 
|p1_type=vector|p1_name=axis|p1_desc=arbitrary axis to rotate the object around
 
|p1_type=vector|p1_name=axis|p1_desc=arbitrary axis to rotate the object around
 
|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
 +
|p4_type=vector|p4_name=offset|p4_desc=offset from the center of the prim translates the '''axis'''
 
|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''' passing through '''offset''' 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,  
 
//  rotates the z axis once every two seconds.
 
//  rotates the z axis once every two seconds.
 
//  combined the rate is about 3.20156 revolutions per second
 
//  combined the rate is about 3.20156 revolutions per second
llTargetOmega(<1.0,3.0,0.5>,TWO_PI,1.0);</pre>
+
llTargetOmega(<1.0,3.0,0.5>,TWO_PI,1.0, <1.0, 2.0, 3.0>);</pre>
 
|spec=
 
|spec=
 
===Physics===
 
===Physics===
Line 19: Line 23:
 
*If the object is physical then the physical representation is updated regularly.
 
*If the object is physical then the physical representation is updated regularly.
 
===Link Sets===
 
===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 [[Viewer coordinate frames#Region|region]] '''axis'''
 
*If the script is attached to the root prim, the entire object rotates around the [[Viewer coordinate frames#Region|region]] '''axis'''
 
**If the object is attached then it rotates around the attachment '''axis'''
 
**If the object is attached then it rotates around the attachment '''axis'''

Revision as of 09:23, 31 May 2007

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

Summary

Function: llTeleportAgent( key id, string simname, vector pos, vector look_at );
REQUEST Function ID
0.1 Forced Delay
10.0 Energy

Teleports agent id to location pos.

• key id
• string simname
• vector pos
• vector look_at

Caveats

  • This function causes the script to sleep for 0.1 seconds.Agent must be the script owner or must be on script owner's land.
All Issues ~ Search JIRA for related Bugs

Examples

Notes

This would be extremely useful in complex builds and HUDS. NOTE: look_at is included to match llMapDestination's look_at possible future functionality, which currently does nothing.

Deep Notes

Search JIRA for related Issues

Signature

//function void llTeleportAgent( key id, string simname, vector pos, vector look_at );


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

Teleports agent id to location pos. 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

  • This function causes the script to sleep for 0.1 seconds.Agent must be the script owner or must be on script owner's land.
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

This would be extremely useful in complex builds and HUDS. NOTE: look_at is included to match llMapDestination's look_at possible future functionality, which currently does nothing. 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 );