Download

2D Top Down - Disable Diagonal movement

Hello, so i was wondering if there is a way to disable the Diagonal movement (such as W+D or S+A) or disabling a key press function?

Thank you

Ryscale

Hmmm, the way I would probably look at this, off the top of my head, would be to create your key axis that move in each direction. When you press a direction you could set a bool to stop inputs advancing on other input key presses. that way you would only move in one direction at a time. On un-press you would then enable the bool to allow movement again. probably not the best way to do this, but the first I thought of.