How to constrain my player character to only move at 45 degree angles?

HI, I’m trying to create a way of moving only at 45 degree going forward. my issue right now is that I’ve done so but when I press the down key it goes in reverse and I’d like to convert the reverse movement at the 45 degree angle to a forward movement down at a 45 degree angle. any help with this would be very much appreciated!
thanks,
Patrick

Can you show how you do your movement? Otherwise we can only guess.

Hey there, a video would be helpful to see what you mean.

Sorry for the late reply, i made this video to show what meant by the movement im trying to achieve

Sorry for the late reply, i made this video to show what meant by the movement im trying to achieve

sorry i had it on private, it should work now

The video is not working.

Will he always walk in that axis? can you show me your movement blueprint nodes?

Not having seen your movement code and assuming your pawn has a Character Movement Component, try to use Add Movement Input with a World Direction having equal X and Y components but with all sign variations (positive X, positive Y ; positive X, negative Y and so on). You should obtain a movement along all 45 degrees angles.

224897-diagonal.png

the Right vector points Right while the Forward points up for your example

On W you add both you get a 45° pointing up+right between them and move in that direction.
On S you add the negated right vector + to the forward and get a vector pointing up+left, but since you axis input is -1 you move the other direction down left

1 Like

Thank you so much @dark-killer sorry to everyone on the thread and being so patient with me. thanks guys and have a great holiday!