Create a cube and insert the following script
default
{
state_entry()
{
llListen(0,"",llGetOwner(),"");
}
listen( integer channel, string name, key id, string message )
{
rotation x_10 = llEuler2Rot( <10 * DEG_TO_RAD,0,0> );
rotation new_rot;
if ( message == "G+" )
{
new_rot = llGetRot() * x_10 ;
}
if ( message == "G-" )
{
new_rot = llGetRot() / x_10 ;
}
if ( message == "L+" )
{
new_rot = x_10 * llGetRot() ;
}
if ( message == "L-" )
{
new_rot = x_10 / llGetRot() ;
}
llSetRot(new_rot);
}
}
Enter commands (["G+", "G-" ,"L+", "L-"]) in chat window and watch the changes of the rotation values in the edit window
Expected: If y- and z-rotation is 0, G+ and "L+" adds 10 degrees to x-rotation, "G-" and "L-" substracts 10 degrees from x-rotation
Observed: G+, G- and L+ works as expected. Starting with 0,0,0 rotation, each L- toggles the rotation between 10,0,0 and 0,0,0. Starting with y- or z-rotation != 0, each L- toggles between two floating away points