PDA

View Full Version : Mouse beyond border



RHINO
01-12-2007, 05:45 PM
I trying to make a first person like camera, that will rotate when you move the mouse. I have succeeded, however, the mouse only goes to the screen edges and stops. So basically there is no way for me to turn around, I am confined to the 180 degrees directly in front of me, how can I detect if the user is moving the mouse still even if the actual mouse pointer is already at the border of the application.

zeoverlord
01-12-2007, 07:26 PM
easy, continually move the cursor to the middle of the screen each frame and just read the change from the default.

RHINO
01-13-2007, 09:39 AM
Sorry, but exactly how would I reposition the mouse?

Not sure if it matters, but I should mention that I am using GLUT.

RigidBody
01-13-2007, 10:45 AM
glutWarpPointer is the function you need.

RHINO
01-13-2007, 11:35 AM
Thank you for your help, I got it working exactly as I intended.

However, there is just one more issue: How could I "hide" the mouse pointer, so you don't see it flickering back and forth in the middle of the screen?

Tin Whisker
01-13-2007, 01:44 PM
You might find the docs helpful...

http://www.opengl.org/documentation/specs/

http://www.opengl.org/documentation/specs/glut/spec3/node28.html#SECTION000513000000000000000