I’m using base.mouseWatcherNode.getMouse() to get the position of my mouse with getX() and getY() .
All works good until I reach the value 1 which apparently is the max. So I’d like to reset that value to zero when the max is reached but there is no setX() function defined and couldn’t find any.
First of all, resetting the mouse to 0 every frame is not such a good practice - it is better to set the mouse to relative mode. However, not every operating system implements that well.
This is how you can reset the mouse to the middle of the window:
Hm, relative mouse mode should work on OSX and Windows, and as of the latest CVS version of Panda (and >1.7.0 of course) it should also work on other unixes.
Hrm… I don’t have a Mac myself. Please file a bug report with working and small sample code at bugs.launchpad.net/panda3d/ and give instructions how to reproduce the bug. Just so that the bug doesn’t get lost in the forums.