-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
AnimationPlayer.seek does not work as documented (or logical at all) with call method tracks #92805
Comments
I think it was a bug that the behind method key was fired. It should have been fixed by #85569, please check 4.3.beta1. Also if it is seeked, the event is not always skipped, as it depends on the |
Not fixed in v4.3.beta.custom_build [e96ad5a]. |
I have looked into the project.
Taken together, the demo project is wrong in the expected statement and I do not see the problem about the flags. However, the documentation certainly seems to need proofreading as it may cause misunderstandings. Also, if I look at the code, it does not fire all events during seek, but only the events of the previous key. This change was made a long time ago, and I don't remember where, but I think there was some kind of problem at the time. It might make sense to fix it, but it would require some research. |
Regarding I certainly agree that the documentation is in dire need of an update but even after your explanations I am still a little confused.
is only true for call method tracks and not property tracks.
The method is called but the string is not changed (key at position 0) when seeking after playing. But only if the AnimationPlayer is already playing:
I think I can follow your explanation there.
But why is the method called but the string not changed here? If we look at the second animation (which has a key on position 1.0) there is also something I don't quite get:
Here only the property track is processed.
Here only the call method track is processed.
This works as expected. The takeaway:
DISCLAIMER: |
Tested versions
Reproducible in 4.2.2.stable
not Reproducible in 4.1.4.stable and 3.x
System information
Godot v4.2.2.stable.mono - Ubuntu 22.04.4 LTS 22.04 - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 535.171.04) - Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz (4 Threads)
Issue description
AnimationPlayer seeking does not work as described in the documentation in regards to functions called via call method tracks (I have not tested other tracks).
Especially "Events between the current frame and seconds" are inconsistently not "skipped".
Seeking is done via AnimationPlayer.play() directly followed by AnimationPlayer.seek().
Methods at time 0 are always called when they never should.
Methods in between 0 and the 'seeked seconds' are skipped or not depending on the animation.
And btw if events are skipped anyways (per documentation), what does 'update_only' actually do?
Steps to reproduce
It is easier to just look at the MRP than explaining it here.
Minimal reproduction project (MRP)
4.2 version:
AnimPlayerBug_v4.2.zip
Correctly working 4.1 version:
AnimPlayer_v4.1.zip
The text was updated successfully, but these errors were encountered: