One-shot in AnimationTree loops and does not stop unless aborted

Godot Version

v4.2.1.stable.mono.official [b09f793f5]

Question

I have this AnimationTree. First, I started with a blended animation between idle/walk/run that has been working as intended. Then I added a one-shot for an animation to play periodically while the character is idle.

Here are the properties of the OneShot node:

I have this snippet that runs once. I have verified that this is definitely running just once, and not repeatedly.

self.animation_tree.set(
    "parameters/ActionLookAroundOneShot/request",
    AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE
)

Upon requesting the one-shot animation to fire, it continues and loops forever. (Unless an abort request is sent.)

What’s going on here? Have I misunderstood how one-shot animations are meant to be defined and triggered?

Is the action_look_around animation set to loop? Autorestart is off, but the Delay has a reset sign on, maybe press that?

1 Like

The delay isn’t it, it still does it either way.

The animation is set to looping. I named the animation action_look_around_loop in Blender, because the animation can be cleanly looped. I assumed that playing it as a one-shot would override that setting, but I guess not? It did work as I expect when I removed the _loop text from the animation name in Blender.

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