Difference between revisions of "LlRotateAgent"

From Second Life Wiki
Jump to navigation Jump to search
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{LSL_Function|func_id|mode=request|func_sleep=0|func_energy=10.0|func=llRotateAgent|sort=RotateAgent|p1_type=vector|p1_name=direction|
{{LSL_Function|func_id|mode=request|func_sleep=1.0|func_energy=10.0|func=llRotateAgent|sort=RotateAgent|p1_type=vector|p1_name=direction|
|func_desc=Rotate '''owner''' to point toward '''direction'''.
|func_desc=Rotate '''owner''' to point toward '''direction'''.
|return_text|spec|caveats|examples=
|return_text|spec|caveats|examples=
Line 12: Line 12:
llRotateAgent(direction);<br>
llRotateAgent(direction);<br>


|helpers|related|also|notes=This should be called from within an attachment and from no other place. Ideally it would throw out the Z component of the direction vector. Since the old llPointAt() function is deprecated and can't be re-enabled by the community until the server code is opened up, I wanted to propose that LL add a function with this prototype. This should be a one-shot function that does <b>not</b> hold the avatar in the specified direction permanently, but works once and once only.<br><br>Animations can not duplicate this functionality, as when an animation is complete the avatar returns to its previous position and orientation.}}
|helpers|related|also|notes=This should be called from within an attachment and from no other place and only with PERMISSION_TRIGGER_ANIMATION set. Ideally it would throw out the Z component of the direction vector. Since the old llPointAt() function was never enabled in production versions of the server, and can't be enabled by the community until the server code is opened up, I wanted to propose that LL add a function with this prototype. This should be a one-shot function that does <b>not</b> hold the avatar in the specified direction permanently, but works once and once only.<br><br>Animations can not duplicate this functionality, as when an animation is complete the avatar returns to its previous position and orientation.<br><br>The sleep caveat is to prohibit malicious AO makers from spinning avatars so fast that it makes RL people dizzy.<br>----<br>It isn't that it has been deprecated, it just was never enabled. I should probably append that to the function description.<br>----<br>No need, I just added that. It's listed as deprecated in all of the documentation so that's why I originally said so here. (and I really *must* learn to use preview...}}

Latest revision as of 13:50, 21 March 2007

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

Summary

Function: llRotateAgent( vector direction );
REQUEST Function ID
1.0 Forced Delay
10.0 Energy

Rotate owner to point toward direction.

• vector direction

Caveats

  • This function causes the script to sleep for 1.0 seconds.
All Issues ~ Search JIRA for related Bugs

Examples

vector position_to_point_at;
vector my_pos;
vector direction;

position_to_point_at = [get position of some object];
my_pos = llGetPos();
direction = position_to_point_at - my_pos;

llRotateAgent(direction);

Notes

This should be called from within an attachment and from no other place and only with PERMISSION_TRIGGER_ANIMATION set. Ideally it would throw out the Z component of the direction vector. Since the old llPointAt() function was never enabled in production versions of the server, and can't be enabled by the community until the server code is opened up, I wanted to propose that LL add a function with this prototype. This should be a one-shot function that does not hold the avatar in the specified direction permanently, but works once and once only.

Animations can not duplicate this functionality, as when an animation is complete the avatar returns to its previous position and orientation.

The sleep caveat is to prohibit malicious AO makers from spinning avatars so fast that it makes RL people dizzy.
----
It isn't that it has been deprecated, it just was never enabled. I should probably append that to the function description.
----
No need, I just added that. It's listed as deprecated in all of the documentation so that's why I originally said so here. (and I really *must* learn to use preview...

Deep Notes

Search JIRA for related Issues

Signature

//function void llRotateAgent( vector direction );