CODE
currentRot = llGetRot() + (currentRot * llEuler2Rot(< 0, 0, -10 > * DEG_TO_RAD));to rotate me by a constant amount each time, but it doesn't.
I'm trying to change my rotation with a menu, and my code now looks like
CODE
else if(message=="left turn")
{
llOwnerSay("currentRot is "+(string)currentRot+", or "+(string)(llRot2Euler(currentRot)*RAD_TO_DEG));
currentRot = llGetRot()+ (currentRot * llEuler2Rot(< 0, 0, -10 > * DEG_TO_RAD));
llOwnerSay("changing it to "+(string)currentRot+", or "+(string)(llRot2Euler(currentRot)*RAD_TO_DEG));
}
What it says to me, when I repeatedly click it, is
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, 0.00000, 1.00000 >, or < -0.00000, 0.00000, -0.00000 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.08716, 1.99620 >, or < 0.00000, 0.00000, -5.00000 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.04363, 0.99905 >, or < 0.00000, 0.00000, -5.00083 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.13053, 1.99144 >, or < 0.00000, 0.00000, -7.50041 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.06542, 0.99786 >, or < 0.00000, 0.00000, -7.50160 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.15214, 1.98836 >, or < 0.00000, 0.00000, -8.75080 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.07631, 0.99708 >, or < 0.00000, 0.00000, -8.75316 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.16292, 1.98664 >, or < 0.00000, 0.00000, -9.37658 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.08174, 0.99665 >, or < 0.00000, 0.00000, -9.37757 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.16830, 1.98574 >, or < 0.00000, 0.00000, -9.68878 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.08716, 1.99620 >, or < 0.00000, 0.00000, -5.00000 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.04363, 0.99905 >, or < 0.00000, 0.00000, -5.00083 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.13053, 1.99144 >, or < 0.00000, 0.00000, -7.50041 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.06542, 0.99786 >, or < 0.00000, 0.00000, -7.50160 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.15214, 1.98836 >, or < 0.00000, 0.00000, -8.75080 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.07631, 0.99708 >, or < 0.00000, 0.00000, -8.75316 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.16292, 1.98664 >, or < 0.00000, 0.00000, -9.37658 >
[10:45] change sit target v 3: currentRot is < 0.00000, 0.00000, -0.08174, 0.99665 >, or < 0.00000, 0.00000, -9.37757 >
[10:45] change sit target v 3: changing it to < 0.00000, 0.00000, -0.16830, 1.98574 >, or < 0.00000, 0.00000, -9.68878 >
How can I get it to change by a constant amount rather than decrease each time I try to turn myself?