I’m making a sidescroller with a 2d character. The character can aim his weapon in 8 directions. So far i can aim left, right, up, and down. I need to create a test that checks whether I’m currently pressing diagonally up or diagonally down on the left analog stick and then returns a bool. The bool will then be used to adjust the animation state. There needs to be an equal range of motion between all 8 possible axis states so that the character animates smoothly. Currently I can detect the various diagonal quadrants but the animations interfere with each other. For example if i set the diagonal SouthEast quadrant the character will fire the diagonal down animation instead of the running right animation and it also replaces the look down animation.
I need to know how to reduce the viable range this will equal true by about 30 %. Also I don’t really know anything about vector math so if I’m doing something wrong or there is an easier way please let me know.