User:Toy Wylie/RLV Documentation/setrot
Jump to navigation
Jump to search
@setrot
Type
General
Implemented
Implemented since RLV version 1.17
Usage
@setrot:<angle>=force
Purpose
Rotates the user's avatar to face the angle given in radians. An angle of 0.0 means "Face North". Keep in mind that an avatar will only rotate if the difference is big enough from the current rotation. The threshold is around 6° to 10°.
See Also
Example
<lsl>default
{
touch_start(integer num) { if(llDetectedKey(0)==llGetOwner()) { float angle=llFrand(TWO_PI); llOwnerSay("@setrot:"+(string) angle+"=force"); llOwnerSay("You are now facing "+(string) ((integer) (angle*RAD_TO_DEG))+"° from the north."); } }}</lsl>