llSetRot
LSLvoid llSetRot(rotation rot)
If the object is not physical, this function sets the rotation of the prim.\ If the script is in a child prim, Rotation is treated as root relative and the link-set is adjusted.\ If the prim is the root prim, the entire object is rotated to Rotation in the global reference frame.
Parameters
| Type | Name | What it does |
|---|---|---|
| rotation | rot | The rotation, a quaternion. |
Example
default
{
touch_start(integer n)
{
// Turn 90 degrees about the vertical axis.
rotation turn = llEuler2Rot(<0, 0, 90> * DEG_TO_RAD);
llSetRot(llGetRot() * turn);
}
}Spin continuously instead (no script time)
llTargetOmega(<0, 0, 1>, PI / 4, 1.0); // a quarter turn a second
Sleeps
0.2s
Energy
10
The Linden Scripting Library — what every SL-compatible grid provides.
More in LSL
void llAddToLandBanList(key avatarId, float hours)
list llLinksetDataFindKeys(string pattern, integer start, integer count)
integer llTarget(vector position, float range)
void llLinkParticleSystem(integer linknum, list rules)
list llParseString2List(string str, list separators, list spacers)
list llCastRay(vector start, vector end, list options)
integer llGetInventoryNumber(integer type)
float llVecMag(vector v)