How to correct the RotZ error?
by rotating the viewer around the X and Y axis, the Z axis gets involved.
I have no idea how to correct this error? - Please help!
I tried two implementations:
The input-variables y_angle and x_angle I am calculating from mouse-inputs.
When I am using only one axis, all is good - no Z-error. But by combining X and Y there is an error. Here is a screen capture: (Left is only one axis, right has both axis)
The green lines show how the cube got moved.
The yellow box show how the cube should be. There is a rotation around the Z-axis, that I never have set.