Exploring changes with transform tracks
In this recipe, we are going to create a MeshInstance3D node. In the Animation Player, we will animate the 3D mesh using the new 3D Position, Rotation, and Scale tracks.
Getting ready
For this recipe, open Godot 4 and start a new project called Chapter 9
. In the Scene tab, click 3D to add a 3D scene. Click on the word Scene in the main menu next to Project, then select Save Scene As, and name it Animation
.
How to do it…
First, we will add a MeshInstance3D node and the AnimationPlayer node to our scene:
- Left-click on the Node3D 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 MeshInstance3D to create the node in the scene. Left-click the Create button. - In the Inspector tab, click on <empty> to the right of Mesh and select New BoxMesh.
- Left-click on the Node3D node and then left-click the + button in the Scene tab. In the Create...