Camera rotate

Started by LiuFeng, August 29, 2007, 08:03:55 PM

Previous topic - Next topic

LiuFeng

What object in jpct support to move camera fllow mouseMove event like ConterStrike game??
Thank for help!

EgonOlsen


LiuFeng

i already try to use the tip in that thread , but it throw this exeption:
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalStateException: Display must be created.

i cant not find error!

EgonOlsen

That is the error:

java.lang.IllegalStateException: Display must be created


You can't initialize the mouse-related stuff before an OpenGL-window has been created (i.e. before the renderer has been set). Or are you using the software renderer? Then it would be a different story.

LiuFeng

no,my computer already has openGL, because  i run feud_demo  well

Melssj5

Egon means that the call to the MouseMapper have to be called after initialiting the OpenGl code. This is becausse the MouseMapper works on native OpenGl windows.

If you are using software rendering you can use normal mouse events.


code sequence

-------
build the world and all those stuff

init all the rendering stuff

init the MouseMapper stuff

renderLoop

whatever
Nada por ahora