0 votes

Edit: I used the seek method from AnimationPlayer, but it just use the time of the current animation and not the keyframes and I have a lot of animations with different durations. =/


I have an animation with 5 keyframes of 3 second each, and I need that if the CollisionShape2D detects a collision in the third keyframe of the animation it skips to the fourth keyframe, even if it is on time 1.2 second, 2.4 seconds, etc of the third frame.

I need to do this via script using the AnimationPlayer key-frame and not just skipping to the next sprite frame.

Is there anyway to jump to the next key-frame of the current animation? Thanks.

asked Dec 30, 2019 in Engine by arthurZ (121 points)
edited Dec 30, 2019 by arthurZ

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.