This is best demonstrated by example. Run the following, drag the client window somewhere besides the original location, then right click inside the window.
For context, I'm writing the beginnings of a 3rd person 3D game and I allow for the player to rotate the camera with their mouse while right clicking. Upon right clicking, I set mouse.visible = False and then for each frame while right click is held, compute the mouse's displacement and overwrite its location with the original mouse location. The displacement is then translated into camera rotation. When right click is released, I set mouse.visible = True.
A viable workaround is to keep the mouse visible and not overwrite the mouse location. I'm an amateur game dev, so I may have had the wrong approach in the first place or missed something simple, but this still seems like a legitimate bug. Feedback is appreciated :). Otherwise, I may take a stab at this eventually.
This is best demonstrated by example. Run the following, drag the client window somewhere besides the original location, then right click inside the window.
For context, I'm writing the beginnings of a 3rd person 3D game and I allow for the player to rotate the camera with their mouse while right clicking. Upon right clicking, I set
mouse.visible = False
and then for each frame while right click is held, compute the mouse's displacement and overwrite its location with the original mouse location. The displacement is then translated into camera rotation. When right click is released, I setmouse.visible = True
.A viable workaround is to keep the mouse visible and not overwrite the mouse location. I'm an amateur game dev, so I may have had the wrong approach in the first place or missed something simple, but this still seems like a legitimate bug. Feedback is appreciated :). Otherwise, I may take a stab at this eventually.