02-06-2005 10:18
I'm sorry if this is a well covered question; even after searches an answer, I still have questions:

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
_____________________
A tired mind become a shape shifter
Everybody need a mood lifter
[Rush - Vital Signs]