Skip to content
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

Blend the animation playback track when timestamp value is manually changed #86298

Closed

Conversation

Miguel0312
Copy link
Contributor

Before, the tracks of type Animation Playback weren't recalculated when the timeline was changed manually, it was only updated when the track's animation was played. Now, we can manually set a time value and see how the animation will look at that instant, allowing to more easily sync multiple animations.

Preview

I created a simple AnimationPlayer that makes a blinking sprite and connected it as a track in another AnimationPlayer.

Screenshot from 2023-12-18 14-03-49
Screenshot from 2023-12-18 14-04-12
Screenshot from 2023-12-18 14-04-33

@Miguel0312 Miguel0312 requested a review from a team as a code owner December 18, 2023 13:06
@AThousandShips AThousandShips added this to the 4.3 milestone Dec 18, 2023
@YuriSizov YuriSizov changed the title Blends the Animation Playback Track when timestamp value is manually changed Blend the animation playback track when timestamp value is manually changed Dec 18, 2023
Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AnimationPlaybackTrack key triggers playback, not updates. It means that another AnimationPlayer that is assigned may have AudioTracks, MethodTracks, etc., and they must not be fired when update_only.

At least the third argument of player2->seek() should propagate p_update_only. But I still wonder if that is enough to guarantee safety.

By the way, with the AnimationMixer implementation, AnimationPlayer can theoretically be externally blended with arbitrary weights. My plan is to implement an api that allows AnimationPlaybackTrack to control the animation externally with more flexibility than play() and seek() as the similar way with AudioPlaybackTrack, as I mentioned in #70338 (comment).

@TokageItLab TokageItLab modified the milestones: 4.3, 4.x Dec 18, 2023
@TokageItLab
Copy link
Member

I sent a proposal for correct implementation to handle AnimationPlaybackTrack godotengine/godot-proposals#8783

@akien-mga
Copy link
Member

Superseded by #89794. Thanks for the contribution!

@akien-mga akien-mga closed this Mar 23, 2024
@akien-mga akien-mga removed this from the 4.x milestone Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AnimationPlayerEditor doesn't preview the Animation when seeking Animation Playback Tracks
4 participants