MRelative on Windows should automatically keep the cursor centered

Bug #1003669 reported by coppertop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
Unassigned

Bug Description

Right now, the optimal way to build mouselook for Linux and Mac is to use MRelative and do it without resetting the mouse cursor. However, the only way on Windows is manually resetting the cursor since MRelative does nothing there. It means one should either make two mouse look mechanisms, or stick to manual resetting which is redundant on Linux and Mac.

It would be great if MRelative on Windows automatically kept the cursor centered, just for the sake of consistency.

Revision history for this message
rdb (rdb) wrote :

Perhaps it could use a Windows API function like ClipCursor to constrain the cursor to an area in the centre of the window.

Revision history for this message
ellie (et1234567) wrote :

Any updates on this? This is more of a problem than it might seem at first:

Even with manual mouse reset each frame, it is quite easy to move the mouse fast enough to escape the window for one frame, and a well-timed (or very badly placed accidential click) can easily lose the focus entirely.

So MRelative + manual mouse reset isn't really a working solution for FPS games with Panda3D in windowed mode at all because it is bound to lead to a frustrating unintentional focus loss during gaming. And there is currently no alternative with Panda3D, is there?

Revision history for this message
rdb (rdb) wrote :

This should be covered by the new "confined" mode in Panda 1.9.1. See https://www.panda3d.org/blog/sdk-1-9-1-release/ and the new sample program.

Changed in panda3d:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.