I'm currently working on creating 2d vector based movement in a game and I need some help figuring out my math. On each tick, I'm creating a base direction vector based on the x and y axis on a joystick. The values of the axis are pretty normal ranging from -1 to 1. The issue though is with calculating the magnitude. If my normal movement in a direction caps at a magnitude of 1, then when I create this new vector, the magnitude will usually be greater than 1. For a game, this creates an issue because I want walking in every direction to have the same speed.
One of my solutions for this is to just clip the magnitude at 1. This seems simple enough but I feel like I'm taking a shortcut around actually fixing this problem the right way. Am I approaching this wrong and allowing faster movement along a diagonal is actually the correct action? Thanks
