I have successfully set up the movement for a PaperCharacter in a top-down 2D game in the style of “Zelda”. However, whenever my character moves diagonally, it slows down notably. Normally that would make sense, as the “length of legs” of the character obviously stays the same, so it could only move onto a point on a circle around him, which is what I assume happens internally there. In older games - as this one is trying to mimic -, this was not the case, and it just feels a lot more natural for the character to move with the combined speed of the horizontal and vertical axes when moving diagonally, rather than the “realistic” speed.
Since all of this is a little bit difficult to explain, let me just give an example (Assuming the movement input lasts for 1 second):
If I “Add Movement Input” with the vector (1,0,0) and the character moves with a speed of 300, this will move it 300 units to the right.
If I “Add Movement Input” with the vector (0,1,0) and the character moves with a speed of 300, this will move it 300 units up.
If I “Add Movement Input” with the vector (1,1,0) and the character moves with a speed of 300, this will move it 300 units up and right. This is where the undesireable behaviour occurs, since the distance which the character moves would have to be sqrt(250^2 + 250^2) = 353 in order for the character to keep the same speed as if it was moving on both axes seperately, when moving diagonally.
Does anyone have any ideas how to avoid this problem? The best solution I could come up with is adding a custom movement mode which does the same as the “Walking” mode, except that it handles the way the movement is applied slightly differently. That being said, this would require me to find the exact implementation of the “Walk” movement somewhere in a few thousand lines of C+±code, so I wasn’t exactly successful regarding that, and doubt I will be in the future. So yeah, any creative solutions? Am I just missing an option that I have to tick somewhere, or
does anyone know where I can at least find the code for the “Walking” mode, so I can make the necessary changes? Any help would be appreciated as I am pretty much out of ideas here.