hello…
I am making a JOGL aplication, and would like to allow the user to move the camera in a way that the user is allways looking at the objects ( that are drawed at the origin.
I am trying to do that using the GLUlookAt function, transforming the spherical coordinates into cartesian coordinates:
myGLU.gluLookAt(raioCamera*Math.sin(tetaCamera)*Math.cos(fiCamera), raioCamera*Math.sin(tetaCamera)*Math.sin(fiCamera), raioCamera*Math.cos(tetaCamera), 0, 0, 0, 0, 1, 0);
That way, the user would increment or decrement the value of raioCamera, tetaCamera and fiCamera (That represents the value of the 3 coordinates of the spherical system), and then the gluLookAt function would be called using those values, but frist been transformed to the cartesian system.
Changing the value of raioCamera and tetaCamera produces the desired results, but changing the value of fiCamera mess things up…
Anyone can help me with this?
PS. If u can’t understand what I wan’t to do or what my problem is please tell me that I will try to explain it better, since the text above seens a little confusing even to me