Difference between revisions of "LlRotateAgent"
Jump to navigation
Jump to search
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| | |||
|func_desc=Rotate '''owner''' to point toward '''direction'''. | |||
|return_text|spec|caveats|examples|helpers|related|also|notes}} | |||
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: | 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: | ||
Revision as of 17:06, 8 March 2007
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
LSL Feature Request | |
The described function does not exist. This article is a feature request. |
Summary
Function: llRotateAgent( vector direction );REQUEST | Function ID |
0 | Forced Delay |
10.0 | Energy |
Rotate owner to point toward direction.
• vector | direction |
Caveats
Examples
Deep Notes
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:
llRotateAgent(vector direction)
The usage would be this simple:
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);
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.