-
-
Notifications
You must be signed in to change notification settings - Fork 183
Mouse look scripts
panzergame edited this page Oct 13, 2018
·
2 revisions
#x = (int(render.getWindowWidth()/2)/render.getWindowWidth())-logic.mouse.position[0]
#y = (int(render.getWindowHeight()/2)/render.getWindowHeight())-logic.mouse.position[1]
w, h = render.getWindowWidth() - 1, render.getWindowHeight() - 1
center_x = w // 2 / w # truediv operation
center_y = h // 2 / h # truediv operation
x = center_x - logic.mouse.position[0]
y = center_y - logic.mouse.position[1]