FPS "Mouse Look" Function Random Drifting

Nah doesn’t matter.

The mouselook actuator is bugged in 2.5, this is due to they kept changing the behavior of grabbing the center position. If you use a basic python script it will fail as well.

@willxb272

However you can use my script, it got the fix build in, to compensate the off-center and calculating in true division.

The python fix for upbge 0.2.5(With thanks to the upbge community on gifthub):

w, h = render.getWindowWidth() - 1, render.getWindowHeight() - 1
center_x = w // 2 / w # truediv operation
center_y = h // 2 / h # truediv operation

for python in upbge 3.0 it’s the good old solution(means they fixed it there and restored it back like how it is in bge 2.79)

My .blend (download the correct version)

1 Like