How do i let the cursor move in only one direction?

I want to make the cursor to only move in a straight line , along the monitor’s X axis.(i want the cursor and not the player’s camera to do this)
How can i do this?

Thanks in advance.

I don’t believe you can lock the players actual physical mouse (not counting the mouse locked to game, game and UI, etc. but thats different) but I might be wrong, what you can do is create a HUD element that gets the players cursor, but only updates the position to use the players cursor X position, such as by following this tutorial Blueprints - How to Create a Custom Cursor - Unreal Engine 4 - YouTube but just taking out any of the Y inputs.

Same thing applies if you still are using the mouse cursor position to raycast to the world, just filter it out so you’re only using x/z as the starting point for a ray trace.

Thank you you provided me with just the information i needed :slight_smile:

glad to be of help! :slight_smile: