SOLUTION: if you have the same problem then your probably on windows as well, and for us unfortunately theres no basic solution for this. What u can do instead is to use the MConfined mouse mode and wrap the mouse around the screen. This is the code i use:
dt = globalClock.getDt()
if self.cameraSwingActivated:
md = self.win.getPointer(0)
mouseX = md.getX()
mouseY = md.getY()
mouseChangeX = mouseX - self.lastMouseX
mouseChangeY = mouseY - self.lastMouseY
if not self.shouldUpdateMouseLastPosition:
mouseChangeX = 0
mouseChangeY = 0
self.shouldUpdateMouseLastPosition = True
self.cameraSwingFactor = 10
currentH = self.camera.getH()
currentP = self.camera.getP()
self.camera.setHpr(
currentH - mouseChangeX * dt * self.cameraSwingFactor,
min(90, max(-90, currentP - mouseChangeY * dt * self.cameraSwingFactor)),
0
)
# wrap the cursor around:
if mouseX == self.win.getXSize() - 1:
self.win.movePointer(0, 1, int(mouseY))
self.shouldUpdateMouseLastPosition = False
else:
if mouseX == 0:
self.shouldUpdateMouseLastPosition = False
self.win.movePointer(0, self.win.getXSize() - 1, int(mouseY))
if mouseY == self.win.getYSize() - 1:
self.shouldUpdateMouseLastPosition = False
self.win.movePointer(0, int(mouseX), 0)
else:
if mouseY == 0:
self.shouldUpdateMouseLastPosition = False
self.win.movePointer(0, int(mouseX), self.win.getYSize() - 1)
self.lastMouseX = mouseX
self.lastMouseY = mouseY
This should be easier once 1.11 comes around, for the time being this code works just fine, but far from ideal, this may cause troubles when needing to do raycasting and alike.