Triggering a transition
In this recipe, we will create two animations. The first will shrink and spin the background. The second will expand and spin the background like a scene transition. We added these animations to the AnimationTree node. We add a Transition node to use as a bridge to run the animations when we hook them up to the Transition node and out to the Output node.
Getting ready
For this recipe, click the + button to the right of the Bones scene we just completed to add a new scene. In the Scene tab, click 2D Scene. Click on the word Scene in the main menu next to Project, then select Save Scene As, and name it Transition
.
How to do it…
Let’s create our MeshInstance2D background. Then, we’ll create Shrink and Expand animations in AnimationPlayer:
- Left-click on the Node2D node and then left-click the + button in the Scene tab. In the Create New Node window, type
mesh
in the search box and then select MeshInstance2D to create the...