Main Menu

Using Mouse

Started by bigfishcatcher, December 12, 2006, 02:19:58 AM

Previous topic - Next topic

bigfishcatcher

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

manumoi

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.

Melssj5

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.
Nada por ahora

Melssj5

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!
Nada por ahora

Melssj5

I declared a Mouse, then just used getDX() and getDY().

Do I need to use the Mouse constructor?
Nada por ahora

Melssj5

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!
Nada por ahora

EgonOlsen

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.