Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Using Mouse
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Using Mouse (Read 5202 times)
bigfishcatcher
byte
Posts: 17
Using Mouse
«
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
Logged
manumoi
long
Posts: 121
Using Mouse
«
Reply #1 on:
December 12, 2006, 10:11:35 am »
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.
Logged
Melssj5
double
Posts: 724
Using Mouse
«
Reply #2 on:
December 12, 2006, 06:19:42 pm »
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.
Logged
Nada por ahora
Melssj5
double
Posts: 724
Using Mouse
«
Reply #3 on:
December 17, 2006, 11:18:26 am »
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!
Logged
Nada por ahora
Melssj5
double
Posts: 724
Using Mouse
«
Reply #4 on:
December 17, 2006, 11:23:28 am »
I declared a Mouse, then just used getDX() and getDY().
Do I need to use the Mouse constructor?
Logged
Nada por ahora
Melssj5
double
Posts: 724
Using Mouse
«
Reply #5 on:
December 17, 2006, 11:28:30 am »
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!
Logged
Nada por ahora
EgonOlsen
Administrator
quad
Posts: 12297
Using Mouse
«
Reply #6 on:
December 17, 2006, 02:12:46 pm »
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.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT - a 3d engine for Java
»
Support
»
Using Mouse