Mouse

Hi! Is it possible to have the mouse inside the game window when the game is running(the mouse never goes out of bounds of the game window while playing)?

i believe you can by geting window size and setting mouse position
http://www.blender.org/modules/documentation/pydoc_gameengine/PyDoc-Gameengine-2.34/Rasterizer-module.html

So I only have to do the getWindowHight and getWindowWidth and then do the setMousePosition?

:smiley: no I wish you have to get the winndow height and width then set the mouse position relative to the size of the window I’m note sure how the code would look i’ll see if i can make it or find it

another thing you can top the mouse from exeeding the window height and width with an if statement if mousePos>maxwindowHeight: set mouse position max windowHeight ect.