Hello,
I use glRotatef & glTranslatef to “rotate my camera”.
glRotatef(-zanglecamera, 0, 0, 1);
glRotatef(-yanglecamera[1], 0, 1, 0);
glRotatef(-xanglecamera[0], 1, 0, 0);
glTranslatef(-xposcamera, -yposcamera, -zposcamera);
The problem is that my input is translation and rotation in a global-coordinate-system. That means that the x-axis stays the same after rotation around the z axis.
The same is true for the translation after the rotation. This does not work with the code shown above as opengl rotates the coordinate system.
I think the translation problem is solved by doing the translation before the rotation. If that is true then i still have the problem with the rotations.
I hope someone can help me with this problem.