Mouse Stuck in Center of Screen Game Preview

Hello,

Currently I am trying to allow the mouse cursor to appear on the screen during game preview. I am able to move the mouse, however it just re-orientates itself back to the center of the screen no matter how much I move it. Any help?

Thanks!

You are using the mouse actuator?

Yes, I am. I am not quite sure what I am doing wrong. I have attached images of the python script and logic editor that I used for this.


Sorry, disregard that last post. I don’t know what I’m talking about, I guess I’m using the action actuator. How would I go about using the mouse actuator?

The mouse actuator (by default) resets your mouse cursor to the middle of the screen. This happens with a lot of “mouselook” scripts too.

I would expect such bricks at a camera or a parent of the camera.

Do you have a script that doesn’t include having the mouse to reset? Thanks again!

A) the mouse look actuator already can do that
B) why do you need “look” and “point” - mode at the same time? Typically you either turn the camera with the mouse OR you point at the screen. E.g. you toggle between the modes with a mouse button.

the most cam.move scripts center the mouse with this python line

render.setMousePosition(int(render.getWindowWidth() / 2), int(render.getWindowHeight() / 2))

maybe it helps?:wink: