Skip to content

Animation track with UpdateMode set to Discrete are not reset by the Deterministic option #113081

@kaluluosi

Description

@kaluluosi

Tested versions

Godot Engine v4.5.1.stable.steam.f62fdbde1 - https://godotengine.org
Vulkan 1.4.312 - Forward+ - Using Device #0: NVIDIA - NVIDIA GeForce RTX 4090

System information

Godot Engine v4.5.1.stable.steam.f62fdbde1 - https://godotengine.org Vulkan 1.4.312 - Forward+ - Using Device #0: NVIDIA - NVIDIA GeForce RTX 4090

Issue description

1.mp4
default.mp4

I am developing my action game, and I want the current attack action to be interrupted when the character is hit.

Then I found that if I call animationplayer.play("hurt") to interrupt the current animation and play a new one while the current animation is playing, if the attack hitbox is still active when it is interrupted, the attack hitbox will remain active.

After my tests, I suspect that the deterministic property of AnimationPlayer only performs the RESET operation when the animation is completely finished, that is, when the animation_finished event is triggered.

If this is the case, there is a big problem: the animation properties cannot be properly cleaned up and reset when the action is interrupted.

Steps to reproduce

1.mp4
Image

Minimal reproduction project (MRP)

animation_reset.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions