I'm currently having a problem with my rotation script when i link it to an object.
The object containing the script seems to go haywire once i link it to any other object, the script is the below
integer i = 0;
rotation rot_xyzq;
default
{
state_entry()
{
llSetTimerEvent(1.0);
}
timer()
{
if(i == 0)
{
vector xyz_angles = <0,-40,0>;
vector angles_in_radians = xyz_angles*DEG_TO_RAD;
rot_xyzq = llEuler2Rot(angles_in_radians);
llSetRot(llGetRot()*rot_xyzq);
i++;
}
else if(i == 1)
{
vector xyz_angles = <0,40,0>;
vector angles_in_radians = xyz_angles*DEG_TO_RAD;
rot_xyzq = llEuler2Rot(angles_in_radians);
llSetRot(llGetRot()*rot_xyzq);
i--;
}
}
}
any suggestions?