Current implementation for first person camera uses SetMousePosition() to recenter mouse when going out of screen limits, that's not the proper way to handle this situation.
Ideally, mouse should be disabled to get a virtual unlimited canvas mouse and use standard mouse functions to retrieve mouse movement data and use it for first person camera movement.
Current implementation for first person camera uses
SetMousePosition()
to recenter mouse when going out of screen limits, that's not the proper way to handle this situation.Ideally, mouse should be disabled to get a virtual unlimited canvas mouse and use standard mouse functions to retrieve mouse movement data and use it for first person camera movement.
GLFW (Desktop platforms) and emscripten (HTML5) provide mouse locking functions. Check https://github.com/raysan5/raylib/issues/257 for emscripten implementation details.
GLFW usage examples https://learnopengl.com/#!Getting-started/Camera https://r3dux.org/2014/11/glfw3-basecode-with-fps-camera-controls/ http://stackoverflow.com/questions/38543483/mouse-for-rotation/38543689