[SOLVED] Pause Animation Graph

Hey all,

Is there any way to pause an animation that is being played via an animation graph? I’m looking for something like this:


I’m hoping to make my rig stand still with the pose from whatever frame I pause it on.

Thanks in advance,

Set speed to 0


What about resetting the current state that the graph is in? Is there a clean way to do that? The only thing I can currently think of is creating a state with a trigger that houses the same animation and transitioning to the same animation when you want to reset.

I know you can reset the entire graph with the reset method.

What do you mean by ‘resetting’? As in starting the animation from first frame?

Yes so whatever state the graph is in currently, I’d like that state to restart from the first frame instead of starting the graph from its initial state.

From the anim component, you can get the animation layer (if you only have one layer, it would be this.entity.anim.baseLayer and you can set the activeStateCurrentTime to 0 https://developer.playcanvas.com/en/api/pc.AnimComponentLayer.html#activeStateCurrentTime

Thanks so much. Incredibly helpful as always :grin:

As a quick aside… love the YouTube video format you’ve been doing. Great job.

1 Like