I’m probably going to be seriously flamed as some kind of uber-newbie here, but I am having difficulty getting my axes of rotation to work independantly.
Eg. I store three values, H, R and B for each object in the scene. These are supposed to reflect axes of rotation BASED ON THE DIRECTION IN WHICH THE OBJECT IS FACING. So, as an example, if I increase ‘H’, the ‘front’ of the object should always raise up, regardless of other rotations.
The following code makes ‘R’ an independant axis (it is not effected by the others), simply because it is ‘first’…
glRotated(B,0,0,1);
glRotated(H,1,0,0);
glRotated(R,0,1,0);
I can make ‘H’ an independant axis by compensating for ‘R’
glRotated(R,0,1,0);
glRotated(H,1,0,0);
glRotated(-R,0,1,0);
But this then throws ‘R’ out, making it effected by ‘H’.
I know there is a way to do this. I know it is probably incredibly simple. I also know that I an having a great deal of trouble figuring out how the @*$& it is done! Can someone give me a little help please?
Thanks.