# How can I pause/resume animation playing in State Machine

**URL:** <https://forums.unrealengine.com/t/how-can-i-pause-resume-animation-playing-in-state-machine/337931>\
**Category:** Character & Animation\
**Tags:** State-Machine, unreal-engine, CPP, question\
**Created:** [November 9, 2015, 2:54pm UTC](https://forums.unrealengine.com/t/how-can-i-pause-resume-animation-playing-in-state-machine/337931 "2015-11-09T14:54:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stan](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Stan](https://forums.unrealengine.com/u/Stan)\
**Post date:** [November 9, 2015, 2:54pm UTC](https://forums.unrealengine.com/t/how-can-i-pause-resume-animation-playing-in-state-machine/337931/1 "2015-11-09T14:54:58Z")

</div>

I need to pause/resume animation from animation blueprint( derived from custom UAnimInstance) Animation is playing from State Machine (not Anim montage). And it should be preferably done from c++ code

What is the best way to do it?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![MickD777](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MickD777](https://forums.unrealengine.com/u/MickD777)\
**Post date:** [November 9, 2015, 3:11pm UTC](https://forums.unrealengine.com/t/how-can-i-pause-resume-animation-playing-in-state-machine/337931/2 "2015-11-09T15:11:15Z")

</div>

I would use the GlobalAnimRateScale on the SkeletalMeshComponent. You can see that the animation is ticked that way in the code:

```
AnimScriptInstance->UpdateAnimation(DeltaTime * GlobalAnimRateScale);

```

GlobalAnimRateScale is public so you should be able, from your custom AnimInstance, to simply do this :

```
GetOwningComponent()->GlobalAnimRateScale = 0.0f;//Pause
GetOwningComponent()->GlobalAnimRateScale = 1.0f;//Resume

```

I havent tried it myself, but this should work!

Mick

---

<div class="post-metadata">

**Author:** ![Talad](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Talad](https://forums.unrealengine.com/u/Talad)\
**Post date:** [May 5, 2024, 5:46pm UTC](https://forums.unrealengine.com/t/how-can-i-pause-resume-animation-playing-in-state-machine/337931/3 "2024-05-05T17:46:13Z")

</div>

Inside the character class, I used  
GetMesh()-\>bPauseAnims = true;

which is the same as you can see in the editor, when you open the character, under Animation there is a “Pause Anims” flag.
