Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)That should restrict your mouse cursor for a first person game.