lwjgl mouse-look?

Started by Durnus, August 12, 2009, 12:58:18

Previous topic - Next topic

Durnus

One of the things I'd like to do to test my applet in its early stages is make a mouselook-controlled camera to actually see what's going on.

I started by looking stuff up. Mouse.setGrabbed() looked like it might work, so I threw that on with a call of Mouse.getDX and DY to get the change. Seeing that grabbing the mouse does not prevent it from leaving the applet, I looked some more and found setCursorPosition. It didn't do anything. But when I commented out my setGrabbed, it worked fine [edit: actually, it's kind of jumpy, but when using setGrabbed there's no jumpiness at all], but the mouse pointer was visible! Trying to do setCursor on the display canvas didn't remove it that well either--the mouse only disappeared until it moved, which happens continuously, making it flicker.

All that aside, my question is: how does one do mouse look with lwjgl?