i’m making a game that is first person, and am running into some issues getting the camera to rotate properly with mouse movement.
my first thought (and the one that is usedin the " First-person 3D camera and movement" example) is to use the dx and dy variables. however, when the mouse snaps back to the center of the screen after the actual input, it records that as an input, too, meaning that i can’t just sum the variables to determine player rotation since it’ll be canceled out the next on_input call. this results in the player being able to turn if they continue moving the mouse, but they’ll snap back to their original orientation once they stop.
annoyed by this, i then did something a bit more manual, comparing screen_x and screen_y against the results of window.get_size to determine if the player had moved the mouse outside the center of the screen. this seemed to work better than the first method, but there’s this very annoying behavior, where it feels like the mouse gets “stuck” in a certain location that isn’t the center of the screen, resulting in you having to fight the mouse input for a few seconds before it goes back to normal and your inputs are properly taken again. worst of all, i can’t seem to reliably replicate the behavior besides just “move the mouse around enough”
how do i get proper mouse looking working?