Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added set_cursor_position and hide_cursor functions #198

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

gufoe
Copy link
Contributor

@gufoe gufoe commented Jan 4, 2020

Hello, I am trying to develop a simple 3d first person shooter game, and I need these two functions.

The problem:
I cannot use the set_cursor_grab on its own, because if the mouse is already on a edge of the window (e.g. 0-300), and I move the mouse left, the WindowEvent::CursorPos will still return 0-300 so i canont detect the fact that the user is trying to move the mouse left (am I wrong?).

Using set_cursor_position in conjunction with set_cursor_grab solves the problem as I'm now able to center the mouse.

@gufoe gufoe mentioned this pull request Jan 4, 2020
@gufoe
Copy link
Contributor Author

gufoe commented Jan 5, 2020

Note that the build failed for external reasons:
Could not compile matrixmultiply.

same on #197

@sebcrozet sebcrozet merged commit 2afa354 into sebcrozet:master Oct 26, 2020
@sebcrozet
Copy link
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants