I’m trying to do typical FPS camera control by moving the mouse to the center of the screen and calculating how far it’s moved since the last frame. This works fine on windows where I can reset the cursor position, but I can’t reset the cursor position on a mac. (Also, I can’t get the cursor to stay hidden)
Here’s what I’m doing:
wp = WindowProperties()
wp.setSize(Settings.WIDTH, Settings.HEIGHT)
wp.setTitle("Modifire")
wp.setMouseMode(WindowProperties.MRelative)
base.win.requestProperties(wp)
# do mouse calculations...
base.win.movePointer(0, self.centerX, self.centerY)
wp = WindowProperties()
wp.setCursorHidden(True)
base.win.requestProperties(wp)
How can I make this possible on a mac?