Invert control based on mouse location

I have a strafe that is based off the mouse location, A going to the player left and D going to the players right. The problem i’m having is when the player is looking down A moves the player to the right and D to the left which can get confusing. I know how to invert the controls, but I was wondering if there is a way to invert them based on the mouse location. The two pictures are my movement controls and my character look at.

You can use a reference to the player controller to do a Get Mouse Position. This should allow you to do whatever logic you need i think. You may need the screen height/width which i know you can get from the HUD Update event but may be another way to query the resolution that i don’t know of.

Ah there it is, you can get the resolution from the player controller: “Get Viewport Size”

Can you explain more because i’m not to experienced with blueprints. I have it so that I can calculate the X and Y of the mouse but I’m not sure what nodes to use so that the controls will change when they are greater than a certain value

Actually I just figured out what you were trying to say. I took the locations of the X and Y then I compared them to the screen size and from there I inverted the movement. Thanks

Great to hear! Glad i could help.