# State machine transition blend works into movement but not back to idle.

**URL:** <https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477>\
**Category:** Character & Animation\
**Tags:** unreal-engine, blend, transition, question\
**Created:** [December 9, 2022, 3:02am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477 "2022-12-09T03:02:16Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 3:02am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/1 "2022-12-09T03:02:16Z")

</div>

I have a very simple animation blueprint for a character, and it all works great. _However,_ the transition blend in the state machine from Moving _back to_ Idle doesn’t blend, and I have no idea why. Here’s what I’ve got:

* * *

The event graph just stores values from the pawn for use elsewhere. Not all values are currently used, but none of them should be causing the problem.

 ![Issue_EventGraph](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/b/7/0b7d74edfb17eda4f6d007c251419d8af5293a12.png)

* * *

Here in the AnimGraph, I’ve got an UpperBody slot set up to be able to be used/not used via a boolean. Also not a problem. Works great.

 ![Issue_AnimGraph](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/7/d6751c12fc543a79d5a32314fbe8379c54272d18.png)

* * *

Here in the state machine, I’ve got the transition that isn’t working selected. I’ve checked and double checked that it matches the one going _to_ Moving, other than the condition of course, and everything _looks_ fine, but it **doesn’t _Blend_ from Moving to Idle.**

_(Edit: To clarify, the transition **itself** works, and I get back to Idle state. But it isn’t **Blending** the transition back, where as the transition to Moving is blended nicely.)_

 ![Issue_StateMachine_Transition_BlendNotWorking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/9/5/f959c4d22597566884c6086f5c76935d8cd14a12.png)

* * *

Here’s the settings of the transition from Idle _to_ Moving, and it works perfectly. The character blends into its movement blendspace as expected.

 ![Issue_StateMachine_Transition_BlendWorking](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/e/1/ce177b2a21a870d4ebd5c91dafaf24b46fcd5599.png)

* * *

So I assume if everything else looks good, the issue must be in the **Idle State** somewhere, but I can’t figure out what’s wrong. O\_o…

 ![Issue_Idle_BlendSettings](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/b/edbe630a91abdc72b22ee1c89af2111b41e523a7.png)

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 3:27am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/2 "2022-12-09T03:27:27Z")

</div>

Hey @WillWeaver!

Try going into that blend that isn’t working and setting the velocity to NearlyEqual 0! That’s what tends to have to be used with animations 🙂

---

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 3:30am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/3 "2022-12-09T03:30:16Z")

</div>

I’ll give it a shot, but I think I might need to clarify the issue. The transition itself works fine, it puts the state back into Idle. **It just doesn’t _Blend_ the transition back to idle.**

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 3:39am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/4 "2022-12-09T03:39:05Z")

</div>

AHHHHHHHHH Okay! Now I smell what you’re steppin in! 🙂

Did you try turning the duration on the blend up higher?  
Also if you are transitioning at 0 velocity, you will only start the blend into idle when COMPLETELY still. Have you tried using a blendspace for this?

---

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 3:46am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/5 "2022-12-09T03:46:16Z")

</div>

I have extended the blend time to confirm it was working going from Idle-to-Moving, and it had the expected result. But no matter what I set the blend time to going back to Idle, it just snaps back into idle animation.

I have not tried using a blendspace for the Idle, as I just needed the character to go into either a “Battle\_Idle” or standard “Idle” animation, so using a boolean to pick the idle animation seemed like the logical choice.

I haven’t had _any_ issue with it getting back to the idle **state**.  
The characer is AI controlled NPC, just moving with “MoveToLocationOrActor” on a timed loop to get a random point. When it starts moving it blends from Idle-to-Moving just fine, just not going back.

**Edit: I extended the transition times to 0.8 each on the transitions and took a video to show the issue:**

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/c/0cc45d61e18d6b8228127c46ca497414130ef783.jpeg "Animation transition blending failure.") ](https://www.youtube.com/watch?v=ILBOT8eObm0)

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 3:52am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/6 "2022-12-09T03:52:51Z")

</div>

This sounds perfect for an “Idle/Run Blendspace”! They’re pretty standard for this sort of thing, it’s almost necessary for a slow down if you don’t have an actual “slowing down” animation.

If it only has a forwards movement, you can just use a Blendspace1D with 2 anims, idle at 0 and run anim at wherever you want, then plugging in “velocity” as your float input. That way it’ll auto-blend up and down based on distance from 0. 🙂  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/e/f/5eff5b035c12bbde67746006a55bf1a52a358906.png)

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 3:54am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/7 "2022-12-09T03:54:17Z")

</div>

Sorry, I didn’t see that video get added until I was finished with this reply. One second.

---

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 3:54am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/8 "2022-12-09T03:54:37Z")

</div>

Yeah, I can definitely give that a try and interp the value as needed in a blendspace. I just wish I understood why this clearly straight-forward function in the transition that works one direction _doesn’t_ work the other way. 😛

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 3:56am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/9 "2022-12-09T03:56:29Z")

</div>

Okay! What kind of moveTo are you using and where? Because you may actually have an issue with the movement itself dropping straight to 0 instead of slowing down. Have you tried modifying the **deceleration/brake** in the Character movement component? That could be an issue.

---

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 3:59am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/10 "2022-12-09T03:59:32Z")

</div>

![Issue_MoveTo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/a/9/8a90f548847d475bbc9ad5c54be93bf43a739890.png)

This is what I’m using to make the character move. Before this is just a “GetNavigablePointInRadius” to set where “WanderTarget” is.

And I did just double check the AI\_Controller to make sure I had no code in it that could be causing an issue.

I have no problem with the actor stopping instantly, but even if it does, my thinking says the character _should_ slowly blend from running to idle even if the root character is stopped instantly.

And regarding the Acceleration and Deceleration, both values match. So its speeding up/stopping at the same rate, just not blending the animation.

---

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 4:09am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/11 "2022-12-09T04:09:11Z")

</div>

I _think_ I have an idea of what might be the issue, but I don’t understand why it would _be_ an issue.

In the Moving state, I’m using a full blendspace with the standard Idle in the center when Forward/Right are both 0. And when increasing the Blend time for that transition, it does slow down the change from Idle to moving.

However, the blending feature in the transition might not work if I’m telling it to go to just an animation asset. So I’ll try replacing the Idles with a blendspace as you said and see if that changes anything.

\*Edit: No beans. Made the blendspace, used the InBattle bool to select the value of the blendspace, and it still snaps to the idle animation. :\

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 4:14am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/12 "2022-12-09T04:14:11Z")

</div>

I mean the idea here is that you have a “Non-Combat Idle/Run” and additionally a “Combat Idle/Run” Blendspace blended by an “IsInCombat?” boolean. All that can go in a single state, so you don’t have to worry about transitions, or you can have the bool be a condition to switch between “Non-C” and “In-C” states. Either way should work. But what I’m thinking is since they move so slowly, what about opening their character/pawn movement component and just lowering their brake speed so they start slowing down earlier, as well? Give more time for the blend to be apparent?

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 4:15am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/13 "2022-12-09T04:15:26Z")

</div>

> [@WillWeaver](#):
>
> Edit: No beans. Made the blendspace, used the InBattle bool to select the value of the blendspace, and it still snaps to the idle animation. :\

I’m confused, where does a bool fit on your blendspace? Should be passing in a float. Can you show me a screen snip of your blendspace?

---

<div class="post-metadata">

**Author:** ![WillWeaver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@WillWeaver](https://forums.unrealengine.com/u/WillWeaver)\
**Post date:** [December 9, 2022, 4:22am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/14 "2022-12-09T04:22:07Z")

</div>

![Capture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/e/27e3998171731b5798c06038f5f7223403acab69.png)  
Here’s where I was using the boolean. The game uses encounters for combat, so they never need to smoothly transition from one idle to another. When they’re in battle, they just need to use the combat idle.

* * *

See, I thought the issue might be that using the animations directly wouldn’t accept the Blend Logic here in the transition within the state machine.

 ![Capture](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/e/81ef60553aa9a188c5e78d0a455b98d30b726acd.png)  
But, the blend logic in the transition _TO_ Moving works perfectly. Even if they suddenly go to full speed, the animation is still gradually blended from its current _to_ running. Just not the other way around. So the Blend Logic works one direction, but identical settings on the other transition don’t blend the animation.

Now, what you suggested is a perfectly functional work-around to use the velocity to blend the animations. I get that perfectly. I just figured that since the transition blends work one direction, it _should_ work the other way. 😛

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [December 9, 2022, 4:32am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/15 "2022-12-09T04:32:39Z")

</div>

> [@WillWeaver](#):
>
> Now, what you suggested is a perfectly functional work-around to use the velocity to blend the animations. I get that perfectly. I just figured that since the transition blends work one direction, it _should_ work the other way.

Right, which seems like it would work. Animation engineering is a finnicky, nit-picky process.

This is what I’m talking about doing, here.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/d/b/fdb62fa7f4c66a914b38e412d7709f4c5153580a.png)

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/a/b/eaba402a75208524708c8d0883d2aeb1a0a8b2bc.png)

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/0/b/40be68cac4d015a22eb66c423151af4e68aedecc.png)

I don’t know if this helps you or not but it might be an easier way. Transitions are just so finnicky I try to avoid them whenever possible. 🙂

As far as the instant idle, I’d say turn down your character’s brake, so they’re forced to slow down to a stop instead of stopping on a dime, as acceleration is definitely affecting the movement. Paired with Blendspaces that should do it.

---

<div class="post-metadata">

**Author:** ![rooogel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@rooogel](https://forums.unrealengine.com/u/rooogel)\
**Post date:** [February 15, 2023, 6:07pm UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/16 "2023-02-15T18:07:49Z")

</div>

Adjust these values found on the Details tab of your Character’s Character Movement Component.  
 ![forum](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/8/6/b86f220194c105518082fe93bf6f412919e3b1d3.png)

---

<div class="post-metadata">

**Author:** ![Mind-Brain](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/mind-brain/32/906573_2.png) [@Mind-Brain](https://forums.unrealengine.com/u/Mind-Brain)\
**Post date:** [February 17, 2023, 3:58am UTC](https://forums.unrealengine.com/t/state-machine-transition-blend-works-into-movement-but-not-back-to-idle/724477/17 "2023-02-17T03:58:59Z")

</div>

Hey @rooogel! Thanks for contributing, and welcome to the forums!
