www.jpct.net
jPCT - a 3d engine for Java => Support => Topic started by: bigfishcatcher on December 12, 2006, 02:19:58 am
-
I was experimenting with FPS example and would like to add mouse movements to it. Can it be done using only jpct or do you also have to use lwjgl also how do you do it.
Thanks
Nubee
-
Hello, according to Egon, there is a mouse mapper in the paradroidz source code
http://www.jpct.net/forum/viewtopic.php?t=563&highlight=mousemapper
You should be able to do what you want wuith it.
-
Yeah, especially if usingOGL render, using the common java MouseListeners is not a god idea, the results are awfull. In fact lwjgl comes with a Mouse class that can be used to do a MouseMapper like Egod did in paradroids.
-
BTW: can I use a MouseMotionListener with OpenGL?
I guess no, but I dont want to create a MouseMapper and I just need the getX and getY methods, not so sophisticated, just to pick an object, nothing else!
-
I declared a Mouse, then just used getDX() and getDY().
Do I need to use the Mouse constructor?
-
I am making lot of spam, but I cant delete my dumb posts.
Anyway to use a Mouse Listener on OGL just declare a Mouse ej:Mouse M;. Mouse is class of lwjgl, then you can acces the Mouse methods like getX () or getDX () to get the movement, and things like that!
-
Yeah, Mouse is quite simple to use. The purpose of the MouseMapper was to offer the same functionality for all renderers, but if that isn't needed, Mouse itself is sufficient.