Movement Speed off when going both forward and right

In my animation Blueprint, I am getting forward and right speed by getting the Dot of forward/right vector and velocity.


this works perfect for my blend space up until I want to move diagonally.

When holding W, I get 800cm/s in forward speed. Which is exactly what I want.
image

Here is the issue:
When holding both W and D to walk diagonally, it for some reason instead of giving me 400cm/s Forward and Right, it for some reason gives me this:
image

I know that other people usually use speed and direction for blend space locomotion stuffs, but I’d rather figure this out than change all my blend spaces :confused:

what your getting is Pythagoras.

effectively, youre adding the forward and right input, what you want to do is clamp that if you need too.

I’m aware that I could do something like (if forward and right speed is > 0, clamp between 0-400) but this wouldn’t work when my blend space goes above 800cm/s, for example I might want to add a running animation.
Is there a different formula for getting forward and right speed that is able to equal 400cm/s each, when walking diagonally?
Like when using the “length” node out of the “get velocity” node, it still gives me 800cm/s as the sum of X and Y velocity when walking diagonally.

velocity length is fine in the animbp

the problem will be on you addmovementinput on your pawn, when moving forward and right you’re adding 1+1.

i think the simplest solution would be to have a bool or enum stating if your walking or running and clamp the max velocity based off that