Mouse Rotation in a 3D Game

Started by
9 comments, last by Scorpion 22 years, 5 months ago
I''ve implemented some mouse routines to turn in the game, which work. But now i have the problem that i can turn for just a small space, because the mouse cursor is still restricted to some space, and i can''t figure out how to register movements that are out of this window. Can someone help me with this? I hope i''ve explained it clear enough btw
Advertisement
There are functions you can use to recenter the mouse pointer.

e.g.
void glutWarpPointer( int x, int y )
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
ah nice! thanks! i was just thinking about some sollution like that.
On Windows, you can also use DirectInput which has some low-level mouse functions. Not as portable as a "glut" function though. However getting raw mouse data allows you to have a better control.
Are there any functions like that in Java 1.2 ?
quote:Original post by Anonymous Poster
On Windows, you can also use DirectInput which has some low-level mouse functions. Not as portable as a "glut" function though. However getting raw mouse data allows you to have a better control.


Well i don''t want to use any DirectX API, so that''s not a real option for me
quote:Original post by bodoche
Are there any functions like that in Java 1.2 ?


You can try JDK 1.4 for that. I don''t know about previous JDK''s, so it might be available in previous versions..
quote:Original post by Fruny
There are functions you can use to recenter the mouse pointer.

e.g.
void glutWarpPointer( int x, int y )


Is it possible to do this without GLUT?
void glutWarpPointer( int x, int y ) is a glut function...included in glut.h
So you must have glut to use this function.
quote:Original post by Anonymous Poster
void glutWarpPointer( int x, int y ) is a glut function...included in glut.h
So you must have glut to use this function.


yep, i know, but i wondered if something like this was possible without glut. just some normal windows method, which does the same.

This topic is closed to new replies.

Advertisement