Do you know how to set a limit, (I mean an area/window) where the mouse cursor can move once the player is inside the game?
I know i need python to make it happen. I was searching a way inside Clark’s reference. Maybe if i use “get window height and width” and then defining a range where the mouse can move using “<” and “>” to define an area… But how to do do that exactly?
Thank you for your time!
# import Rasterizer import Rasterizer # show the mouse pointer Rasterizer.showMouse(True) # get game window height height = Rasterizer.getWindowHeight() # get game window width width = Rasterizer.getWindowWidth() # get the controller controller = GameLogic.getCurrentController() # get sensor named Mouse attached to the controller mouse = controller.sensors["Mouse"] # get mouse position pos = mouse.position