Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Rotation Problem

GameMaster Spore
Registered User
Join date: 30 Aug 2009
Posts: 1
08-30-2009 22:33
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?
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
08-30-2009 22:57
Probably SVC-93
EF Klaar
Registered User
Join date: 11 Jun 2007
Posts: 330
08-31-2009 00:51
You seem to be suggesting that the prim with the script is not the parent prim of the linkset, in which case you may want to use llSetLocalRot rather than llSetRot.