AnimationTree Oneshot behavior

Godot Version

Godot Engine 4.2.1


I have been trying to set up a simple AnimationTree for the game im working on and I havent found a simple way to manage my use case (that I think is pretty common).

When I trigger a oneshot animation and its interrupted with a second oneshot, after the second one finishes, the first one comes back again and plays the remaining part of the animation. [oneshot1-oneshot2-oneshot1 remaining].

For example, if I have 2 attack animations, this kind of overlap its problematic.

Is there a option/parameter to avoid the first oneshot to keep playing afterwards? Just fade out and stop when it gets interrupted by another oneshot…

A simplified version of my setup would be something like this:


You’ll need to request abort or fade out the one shot you don’t want to play by setting its request to any of the values in AnimationNodeOneShot — Godot Engine (stable) documentation in English

Or you could use an AnimationNodeTransition to transition between different attacks.

1 Like

I suppose that I can check which animation is being played every time and decide if needs to be aborted of faded out.

Thanks @mrcdk, Ill try both appoaches to check the one more convenient for my case.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.