-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnimationTree does not stop playing looping AnimationPlayer's Animation Playback tracks #70338
Comments
@TokageItLab got another one involving the machines |
@alfredbaudisch Would disabling the base animation loop solve this? As the name implies, the AnimationPlaybackTrack fires the animation playback, but does not have the ability to stop the loop at will. For example, if the length of the OuterLoop animation is longer than the Loop animation, the AnimationPlaybackTrack will not stop even if the length of the Loop animation is exceeded during playing OuterLoop. However, if the AnimationPlayer is stopped, the AnimationPlaybackTrack playback process will stop, so I think the problem is that this behavior is not consistent with the AnimationTree. At least when the AnimationTree process is stopped, the AnimationPlaybackTrack process should also be stopped. I will look at this later. |
You seem to have a similar problem to #65750: for reasons similar to those explained in #55218 (comment), it is difficult to blend them if there is only one SubAnimationPlayer whose AnimationPlaybackTrack is playing. This means that if we stop SubAnimationPlayer when the blend amount is 0 when the two animations to be blended have an AnimationPlaybackTrack, then one of the AnimationPlaybackTracks will be stop the SubAnimationPlayer, and it will cause both AnimationPlaybackTracks to be killed. In contrast, the workaround we can currently suggest is to insert an AnimationPlaybackTrack that commands stop, or to call a function in the signal or MethodTrack that stops the playback of the SubAnimationPlayer. |
This works, but then unfortunately transitions and fading do not work. But at least it's a start, even though it's a temp hack. |
I uploaded an updated MRP for 4.0.1. |
Godot version
4.0-beta9
System information
Windows 10
Issue description
If a SkeletalMesh has an AnimationPlayer with a looping Animation with Animation Playback Track that loops, here called "Outer Loop":
... and the base "Loop" animation:
...then when the "OuterLoop" is played by an AnimationTree, the AnimationTree will never stop playing "Outer Loop" even after the tree reaches the end state or if you tree to transition to another state, clearly seem by this video:
animationTree-bug1.mp4
Working Scenario
As a comparison, the AnimationTree correctly transitions:
Sample working - the looping animation correctly stops:
animationTree-bug2.mp4
Steps to reproduce
AnimationTree
and anAnimationPlayer
Animation 1 (ex: "TurnOn)":
AnimationPlayback
Track, and insert a key playing an animation from the inheritedAnimationPlayer
Animation 2 (ex: "Outer Loop)":
AnimationPlayback
Track, and insert a key playing the "Loop" animation from the inheritedAnimationPlayer
AnimationTree:
Anim Player
paramMinimal reproduction project
Minimal reproduction project
NOTICE: the reproduction project is similar to the one from #69930 but it's adjusted here to reproduce THIS bug, the attached file is a new project for this bug.
OuterLoopAnimationDemo.zip
Updated for 4.0.1: OuterLoopAnimationDemo-4.0.1.zip
MachineMock.glb
mesh, with an AnimationTree, using the original AnimationPlayer. This scene works correctly and simulates the "Working Scenario" described above.The Red Machine correctly loops and stops ("Working Scenario").
The White Machine is the one bugged, it loops and never stops.
The text was updated successfully, but these errors were encountered: