Center mouse cursor

hi I’ve another question how can i center the mouse cursor on the screen?

import Rasterizer as r
width = r.getWindowWidth()
height = r.getWindowHeight()
r.setMousePosition(width/2, height/2)


Should do the trick

hey thank you i can’t figure it out but now is it clear to me :slight_smile:

when I attempted to do it that way, I got an error(got float instead of int or something like that).
I would modify this script a bit so it will be more reliable

import Rasterizer as r width = r.getWindowWidth()/2 
height = r.getWindowHeight()/2
width_int = int(width)
height_int = int(height)
r.setMousePosition(width_int, height_int)  r.showMouse(1)