Skip to content
lsl.devlsl.devLSL Dev

PRIM_ROT_LOCAL

constant
Constant
integer PRIM_ROT_LOCAL = 29;

Prim parameter [PRIM_ROT_LOCAL, rotation local_rot] to get or set the local rotation of a prim (equivalent to llGetLocalRot/llSetLocalRot).

Constant groups

PrimParam · PrimParamGet

Other PrimParam values (42)
Other PrimParamGet values (40)

PRIM_ROT_LOCAL is used to get or set the prim’s local rotation.

Example 1
15 collapsed lines
integer isRotated = FALSE;
vector rotated = <25, 25, 0>;
rotation notRotated = ZERO_ROTATION;
rotation rot;
default
{
state_entry()
{
rotated *= DEG_TO_RAD;
rot = llEuler2Rot( rotated );
}
touch_start(integer total_number)
{
if( isRotated )
{
llSetLinkPrimitiveParams( 2, [PRIM_ROT_LOCAL, notRotated] );
isRotated = FALSE;
}
else if( !isRotated )
{
isRotated = TRUE;
llSetLinkPrimitiveParams( 2, [PRIM_ROT_LOCAL, rot] );
}
}
}
Original wiki source

Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.