Need Help with Blendspace

UPDATE: it seems the actual issue is the way they calculated direction. Anyone have any fixes for this on how to do direction and speed correctly?

Hey all, how can I fix this animation blueprint

as shown in the photo a tutorial I was following suggested that their should be an idle state before a movement state and an attack state for example. However, I noticed that if I go to change the movement speed to what should be a walking speed (30 for example) it does not transistion to the walking animation set in the blendspace. It will still stay in a running animation. Does anyone have a better method of doing this but still keeping transitions from walk to idle and attack to an idle animation fluid?

NOTE: for the idle, I also like this layout because I know I can use the “random sequence player” in the idle state to randomly choose and rotate between several idle animations. I am not aware of how to do that if I only have one state for idle/walk/run all lumped together.

Video I followed Finishing The Player Character - #5 Creating A Role Playing Game With Unreal Engine 4 - YouTube

I think you need to watch a few more tutorials, however here are some quick tips.

First of, you can have as many states as you want.
you could have one for running, one for walking and one for idle instead of using a blendspace - it all depends on what movement you are going for (see point 4)

Second thing, and probably important as you won’t necessarily find it mentioned in tutorials, Blendspace are only good for specific things - movement not so much.
you can grab any paragon character or even create a 3d blendspace with the mannequin to see why.
Your feet will dip under the ground any time your blendspace approaches a 50% blend between 2 different animations.
As such you either need to invest time and effort (or money) in a proper Foot IK solution that keeps your feet on top of the ground or know ahead of time so that when you notice it later you won’t have to guess about why it happens - (and you’ll have to be ok with the sub par result)

Third thing, you probably want to check that your transition rule for going from idle to running/walking makes sense.
You should transition into that state - regardless of what animation it uses inside, blendspace or animation - if speed is > 0; likewise you want to transition out when speed is < or = 0.
If you add a sprint you may only want to transition when shift is pressed And speed is > 0.

Fourth thing.
decide what YOU are going for.
you have a multitude of ways a character can move. You need to determine what you want based on something else you saw or some logic you decide to adopt in order to determine how you go about it.

the most common approach is to only allow the character to move forward in the direction you point it ( seen in 3rd person demo).
the most comprehensive approach is to have 8 different animations for each possible 45deg. Direction (forward, right 45, right 90, back right 45, back, back left 45, left 90, left 45). These go into a blendspace normally and you will most definitely need a foot IK solution to have it look good.

Hope that helps.
keep on learning and if you have other questions or if you transition state was not the problem just ask :wink:

A few things. First, thanks for the suggestions, I think I found some locomotion tutorials that might be good. Thanks for mentioning that.

Second, I actually figured it out. The real issue with the tutorial is in the anim blueprint they did a vertex squared on the speed instead of just a vertex.

Third, What else would you use a blendspace for instead of movement?

Lots of things. Usually in a 1d way - think of it this way, it interpolates bone position between pose (or anim) a and pose (or anim) b.

so maybe take a bow and arrow pull sequence.
You dont know when the player let’s go and you can’t just load the bow all the way on a single click.
With a 1d blendspace you can interpolate between start and end pose based on a “time” variable of how long the button is held.

Is it the right way to do it? Idk. But if the idea is “I just want to feed a variable and control things with it” then you are 1 step ahead of the game…

As far as 2d examples that actually work out of the box. Swimming cycles if you separate forward and backwards strokes work well (because you don’t care about dipping under).
some other more creative uses involve leaning while moving / defining how much you adapt to the ground slope.

And pretty much any sort of “I dont want to animate stuff, so I’ll feed it a base pose and a value” you can come up with…