Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How can I pause/resume animation playing in State Machine

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

Product Version: UE 4.9
more ▼

asked Nov 09 '15 at 02:54 PM in C++ Programming

avatar image

8 2 3 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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!


more ▼

answered Nov 09 '15 at 03:11 PM

avatar image

2.1k 70 38 259

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question