I want to use mouse movement to control the view rotation (like in a fps).
Therefore I want to set the mouse pointer to the middle of the screen after every movement.
How can I do that?
Posted Wednesday, 28 January, 2009 - 13:39 by Grasshopper
Thank you - but it seems my idea will not work anyway.
I get the following mouse movements(x y):
0.028169010.02087683-0.02816901-0.02087683 set back to middle
000.0438184700.03755869-0.004175365-0.081377150.004175365 set back to middle
000.018779340-0.0093896710 set back to middle
-0.0093896710 set back to middle
The first one would be easy to ignore but second and third...
Any ideas on how to do that? Maybe a different approach?
Posted Wednesday, 28 January, 2009 - 15:32 by the Fiddler
Are you on Linux, by any chance? This call works here, but only on Windows (probably because GameWindow does not build on the standard WinForms infrastructure). Try setting an empty cursor icon instead.
Comments
Re: Mouse Navigation - set mouse pointer position
You can use:
Re: Mouse Navigation - set mouse pointer position
Thank you - but it seems my idea will not work anyway.
I get the following mouse movements(x y):
The first one would be easy to ignore but second and third...
Any ideas on how to do that? Maybe a different approach?
Code looks like this:
Re: Mouse Navigation - set mouse pointer position
I hit the same problem a few days ago and I'm still searching how to solve it inside OpenTK.
Until then, try the following:
This seems to work fine on both runtimes and should serve as a temporary workaround.
Re: Mouse Navigation - set mouse pointer position
ah that works :)
How do you hide the cursor?
Does not do anything?
Re: Mouse Navigation - set mouse pointer position
Are you on Linux, by any chance? This call works here, but only on Windows (probably because GameWindow does not build on the standard WinForms infrastructure). Try setting an empty cursor icon instead.
Re: Mouse Navigation - set mouse pointer position
You're right I'm on linux, I'll try your suggestion...