Mouse position

The way my game right now for selecting the current player skill, is to hit a toggle button, which pauses the game, shows the cursor and brings up the menu to show selectable skills. I want it to be quick to select a new skill, so I dont want to have buttons and such, and I assumed that this method would be easier than setting up 10 Input action events, or hard coding the actionbar for 0-9. I’m also liking not having a visible actionbar cluttering up the screen…

I’m currently using Get Mouse Position Scaled by DPI, saving the current X position to a variable, then comparing the mouse position to that initial position to determine which skill gets selected. But, if my player turns right a bit, and I toggle the menu, My mouse position is now way off to the right, so I cant go outside of the viewport, (and if I do, next click loses focus of the game). Which doesnt allow me to select skills to the right of center.

I cant find a way to get the cursor to wrap, although I did find a feature request that got put in back in 2014. I tried using the Mouse X Axis, but it seems that gets disabled when the game is paused, or when the input mode changes? And I cant find a way to set the mouse position back to 0 when I activate the menu. This is all blueprints by the way, so no c++. Any ideas?

ok, One solution I’ve got is to just use the mouse X location from GetMousePositionScaledByDPI, clamp it between 460 and 1460 to determine the active skill. It works, but doesnt feel as elegant. Also I’m not sure how it will work with resolutions other than 1920x1080?

Edit instead of bumping:

It might have been the Setting input game/uI that was disabling the Mouse Axis event, I now have it just pausing the game, and I’m able to use MouseX event as an input, and it works as I want now :slight_smile: