Sets the rotation the avatar to rot.
void llSetAgentRot( rotation rot, integer flags );
Forced delay: 0.0 seconds. Energy: 10.0.
This function turns the avatar to face the direction indicated by rot.
flags is a placeholder for future expansion. There are no flags defined at this time, pass a constant value of 0.
// Turn the touching avatar to face the same direction as the prim.
default
{
state_entry()
{
llSetText("Avatar Rotator", llGetColor(ALL_SIDES), 1.0);
}
touch_start(integer total_number)
{
llRequestPermissions(llDetectedKey(0), PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
{
llSetAgentRot(llGetRot(), 0);
}
}
}