cody's picture

Mouse capture

There doesnt seam to be mouse capture support in OpenTK yet. That is hiding the mouse cursor and preventing the mouse to leave the window.
Is it on the TODO list already?
If not where would be the right place to implement it?

It is really needed for FPS-like games I think.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

To capture the cursor, set:

CursorVisible = false;

for the GameWindow you are using. This hides and captures the cursor.

If you wish to allow the hidden cursor to leave the window, just set CursorVisible = true once the mouse touches the window border.

cody's picture

Whoops somehow I didnt see this property... thanks.

cody's picture

Uhm... you mean GameWindow.CursorVisible? I really cant find that property...

the Fiddler's picture

You need the latest code from SVN. I misread your original post and thought you were using that already.

It's GameWindow.CursorVisible.