Imagine Mega Man running, and then he starts shooting while running, it goes seamlessly and the run cycle does not restart. How do you do that? Is there a way to tell the next animation to start, not at the beginning, but from the position where the current animation is at in it's cycle?
For 2D, you need animation tracks that line up with each other, and when you switch from one to the other say from walking to shooting, you need to make sure you are at the same time in the new animation as you were in the old animation. You can do this in Godot via the AnimationTree. The BlendTree and the StateMachine are both capable of doing this.
You can also do this using the simpler AnimationPlayer by setting the time yourself using seek()
. Here is a small example you can drop in a project:
There are several ways of handling that. Are you thinking of 2D or 3D?
Claudette It's 2d, with simple sprite based animations. Sometihing like Mega Man or Contra on the NES.
For 2D, you need animation tracks that line up with each other, and when you switch from one to the other say from walking to shooting, you need to make sure you are at the same time in the new animation as you were in the old animation. You can do this in Godot via the AnimationTree. The BlendTree and the StateMachine are both capable of doing this.
You can also do this using the simpler AnimationPlayer by setting the time yourself using seek()
. Here is a small example you can drop in a project:
Claudette Thank you!! That is very cool!!!!!
© 2022 - 2024 — McMap. All rights reserved.