moving the camera with my mouse

Hi all,

I want to move the camera in my 3d-scene by moving the mouse. Here’s my problem:

How can I find out in which direction the mouse has been moved? According to that information I want to move the camera in the same direction!

I’m looking forward to your replies!

Greetings

Use the mouse drag event and store the position of the mouse each time, you can then compute the delta and move your world…

Take a look at the ExaminerViewer class in the gleem library. The source code for this library is in the JOGL demos workspace at http://jogl-demos.dev.java.net/ . It performs all of the linear algebra necessary for rotating about a center point, panning and dollying.