Open jarrodspurrier opened 4 weeks ago
PauseGraph
and ResumeGraph
should be correct. That's what the Update Rate sample uses and I've never seen it return a character to their T pose so there must be something else causing that.
Have you made any progress on tracking down the cause of this issue?
I was not able to get solution 1 to work. But I was able to get solution 2 to work by additionally caching the FadeSpeed when paused, then restoring it on the state when un-pausing.
Another option would be to set the AnimancerComponent.Playable.Speed = 0
which should affect everything, but I still can't see any reason for PauseGraph
to not work. Are you using any other systems that might affect the animations like Animation Rigging or something?
We are using both AnimationRigging and FinalIK. I don't have a whole lot of time to look into this right now, as we are moving really quickly. But I hope to revisit this in the next week or 2 and keep you updated.
In our project, we have a stun effect where we just want to pause all playing animations on the character. I've tried the following solutions each with their own issues:
Solution 1: AnimancerComponent.Playable.PauseGraph()/ResumeGraph() Problem 1: This doesn't pause the current animations in the way I would expect, as the character will just return to a T-Pose while the graph is paused. Is this intended, or is there some mis-configuration that might be contributing to this behavior?
Solution 2: Set AnimancerState.IsPlaying to false and AnimancerState.TargetWeight to AnimancerState.Weight (to all playing states on each layer) Problem 2: This will properly freeze the current playing animation, however when I go to resume it, if a layer was fading from one state to another, it will not resume the fade. Code 2:
Any advice? I feel like this would be something that should be fairly easy to do with Animancer.