I want to rotate an object 1/4 of a turn. So I found this script below. The problem is that is rotates on the object around the center of the object. I want to rotate the object around the left side of the object. The documentation for llEuler2Rot didnt help me.
default
{
state_entry()
{
state closed;
}
}
state closed
{
touch_start(integer total_number)
{
rotation rot = llGetRot();
rotation delta = llEuler2Rot(<0,0,-PI/4>

rot = delta * rot;
llSetRot(rot);
llSleep(0.25);
rot = delta * rot;
llSetRot(rot);
state open;
}
}
state open
{
touch_start(integer num)
{
rotation rot = llGetRot();
rotation delta = llEuler2Rot(<0,0,PI/4>

rot = delta * rot;
llSetRot(rot);
llSleep(0.25);
rot = delta * rot;
llSetRot(rot);
state closed;
}
}
thnx