matrix/quaternion woes
So I got two matrices, the modelview matrix (should only rotates on the Y axis) and a rotation matrix (only rotates on the Y axis). 

Now I need to know what the angle is of the projection (the view I'm looking at) and the rotation matrix's angle then I need to assign a vallue (between 0 and 8) based on that result.

or any other way I can add two rotations together and get a value between 0 and 8.

So basically if you're looking 90d and the enemy is walking 180d you'll see the sprite of the enemy drawn going right.

I've been trying this various ways for about 3 days now. If anyone has any ideas I'd love to h ear them.
matrix/quaternion woes
===

So I got two matrices, the modelview matrix (should only rotates on the Y axis) and a rotation matrix (only rotates on the Y axis). 

Now I need to know what the angle is of the projection (the view I'm looking at) and the rotation matrix's angle then I need to assign a vallue (between 0 and 8) based on that result.

or any other way I can add two rotations together and get a value between 0 and 8.

So basically if you're looking 90d and the enemy is walking 180d you'll see the sprite of the enemy drawn going right.

I've been trying this various ways for about 3 days now. If anyone has any ideas I'd love to h ear them.