... as if there are ever any simple questions about rotation ...
What I'm trying to do is have an object take movement controls when sat on and then respond to the movement inputs pretty much as the avatar would. The script I've written works fine for moving forward, backward, up and down, but I'm having trouble getting it to turn.
The code I'm using is:
if (held & CONTROL_ROT_LEFT)
{
vector eul = <0,0,10>;
eul *= DEG_TO_RAD;
rotation quat = llEuler2Rot(eul);
llSetRot(quat);
}
That will turn it the 10 degrees around the Z axis specified, but then it stops and even re-pressing the arrow key will not start it again.
I want it to turn continuously until the user releases the key, but obviously llSetRot does not work the same as llSetPos in this regard.
What am I doing wrong?