-
-
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
Animation Playback Track not seeking properly in the Animation Editor #38093
Comments
Confirmed in 3.2 beta. This is a good description of the problem. I don't think there would be an issue submitting a PR. |
@EspeuteClement Tested your fix, it doesn't fully fix it. For me it works if you allow the playing animation to hit the start point of that keyframed animation track, but if you try scrubbing through the timeline, seeking to a position after the sub-animation's starting point it will not update the positions. This also fails in runtime using the script below. The seeking functionality would need fixing as well.
I would imagine the intended complete functionality is that where-ever you seek to in the animation, it will update the position of that "one-shot" animation as well. |
So you mean if you scrubb at a point after the end of the animation track, the animation should update to reflect the last frame of the animation track ? I'll try to see if I can fix that, using the code of the looping animation as an example, as this behavior is correct when scrubbing through animations that loops (it correctly update even if you scrub past the end of the animation) |
Anywhere one scrubs to that time should be sent to the sub-animation's seek. I'm assuming it's doing a little math and using relative time. Hopefully that helps. I could be failing to explain this. If in doubt though, there is ground truth in your GlobalAnimationWithLoop animation in the GlobalAnimationPlayer. It shows the correct results when scrubbing. You can compare against that. |
So I tried to reproduce that on my end using my fix on the 3.2 branch, and I don't think I see the issue you are describing, unless I'm mistaken. Using your code show the expected result on my side. Here is a gif of me scrubbing through the one shot and non looping animation, that have a clear start (green dot) and end (red dot), when the fix is applied. And here is an updated reproduction project : One could argue that the animation don't seek at the beginning of the animation when scrubbing before that, but I don't think it's the intended behavior anyways, as it's the same for the looping animation. |
I think I may be the one who is mistaken here. Apologies if that is the case. Upon retesting it is behaving as expected. Not clear what I did previously to encounter it. The initial play triggered the sub animation, but the seeking did not... Likely a mistake in testing on my part. |
Okay, in that case I'll open the pull request. |
Fixes godotengine#38093. (cherry picked from commit aa72af4)
Fixes godotengine#38093. (cherry picked from commit aa72af4)
Fixes godotengine#38093. (cherry picked from commit aa72af4)
Godot version:
v3.2.1.stable.official
OS/device including version:
Window 10 64bit
18362.778
Issue description:
When seeking through an Animation that has a Animation Playback Track, the Animation Playback Track is not updated accordingly if the selected animation is not a looped animation. "Play the Animation from current pos" also doesn't play the Animation Playback Track correctly if the play bar is in the middle of the animation track.
Here is a capture of the expected result that is obtained when playing the animation from the start
Here is a capture of the seeking in the editor that does not play the expected animation
Steps to reproduce:
Or using the included reproduction project :
Minimal reproduction project:
AnimPlaybackBug.zip
Additional notes:
I have a fix available here EspeuteClement@d6f24f8 , but I didn't know if I could make a pull request for a bug that doesn't have an open issue.
The text was updated successfully, but these errors were encountered: