Can you have only two animations in a single 1D blendspace?

Hi everyone.
Working on a new blendspace walking to running.
I am using the default 3rd person template and I changed the max walking speed to 130.
So the “final” animation in the Idle / Run state is now just a nice comfortable walk in stead of a run (as it was in the 3rd person default)
Now I am adding a “Run” state right after the Idle / Walk and I just need to ramp up from walking to running.
My walk speed starts at 130 (this is in the Run state) and then the final Run speed is set as 400.
I added a setup in BP that enables L-Shift to make the character move forward faster.
It kinda works … but not always.
The L-shift function works fine.
No worries there.
However the character starts out idle, then walks, then runs at 400 when the L-shift key is pushes along with W key.
… then it gets weird …
When you release the L-shift and W key the characters stops (as it should) but the walking animation still plays.
Then if I hit the space bar the character jumps (as it should) but the running animation plays.
Really strange.
Is this because my blend space is not working right with only 2 animations in it?

Here are screen grabs:

3e7a684f404c538a5b5c2e14e73b132d8d1336c0.jpegf5184498380b368f97123c7605a917f86578d206.jpeg48c3755b5280453c6af01ebcf430e3875637a204.jpegeb518ef47d62d64045e6fadfc9e2f0a9ccc106ce.jpegc63ed45b45ffed45f3fbb9ebe3ce4a6b19374be2.jpeg

2f5cdc4e474a3ce69c43b1d8d97ff43f25bd090a.jpeg

Should also mention my first state (blendspace) is speed 0 - 130
Then the new Run blendspace I am adding is 130 - 400.
Not sure if that might be the problem.
So I was thinking here you just do a hand off.
Don’t know if it works that way though.

I tried the isinairs both NOT and like they are here and in both cases they don’t stop the running animation from playing when I jump.

Here is a screen recording of the character in game.

https://www.youtube.com/watch?v=hZO2n-Wjr4M&feature=youtu.be

Theres lots of ways here…
Simplest would be to make the blendSpace go from 0 to 400. Idle at 0, walk at 130, run at 400. No need to do two blendspaces for something like that.

Then your other stuff with jump and stop and such just needs to be setup correctly (just like the 3rd person example)
Only thing you need to change from the 3rd person example is the idle/walk/run blendspace to go form 0 to 400 with idle walk run in there.
And the shift key to add 270 to the maxwalkspeed of your movement component. (If the acceleration is too abrupt, try inserting an interpolator)

https://www.youtube.com/watch?v=CPKqP50NB1U&feature=youtu.be

Here is how the blendspace works.

O.k. great thank you.
Its my first time messing with the state machine so I have a quick question for you.
If I set up one single bs from 0 - 400 (which sounds great) how do “stop” at walking speed to walk only?
Do I have the L-shift input set a boolean?
So if the shift key is NOT pushed then the bs wont go past walking speed?
Does that sound right or is there another way to control where in the bs you want to “hang out” or move past?

So reading your post again …

So o.k. you set your max walk speed then at 130 right?
and then set it up in such a way so that when you hit the L-shift key that the max walk speed is a new value of 400?

Yes, pretty much. The BlendSpace is then driven by your current speed. So it will automatically pick up sprint if that adjusts the movement component maxwalkspeed.

O.k. thanks I see.
So the way (or one way at least) to tell the bs where to be at a given moment is by settings rules connected to the character’s speed (and direction if you need to do that).
So you set the speed, the bs looks at that and kicks in the animation needed to play at that “speed point”.
So now … if you have 2 blendspaces and both have each own (different) animations at a certain speed and you don’t set a rule that differentiate between them, then the engine
gets confused right?
So that is probably why I get the wrong animations playing like running when the character is jumping.
Its probably looking at the speed the character is moving and doesn’t know if it should play the jumping or running animation.
That is what its doing now.
Sometimes its running in the air and sometimes it playing the jumping loop.

I guess I am trying to figure out the “best logic” associated with stringing blendspaces together :slight_smile:

O.k. so this is a lot better.
Still some issues but I can see now how this is going to come together.

7def7e5a5d27d23c5bb82702753705dba57e4c0e.jpeg

Here is a better in game action now: https://www.youtube.com/watch?v=_FB_p37uZ50&feature=youtu.be

I need to work on my turn vectors now though they are little messy at the moment.

Nailed it.
I totally “over logiced it”.
The much simpler thinking works perfectly fine heh.

ba077ba7f0d4752113606aa32d26434d8aadecd8.jpeg