Making a Sprite Explode in Godot: A Godot 4 Tutorial
Do you want to explode a game sprite? I know I do. So lets start setting this scene up. Create a new project. In the scene tree add a Node2D and name it Main. Attach a script. We will need it. Then save the scene, and try to play the scene. This will give you the option to select this scene as the "Main Scene" or entry point of the game. Next we need to make a sprite we can blow up. Click "Scene" -> "New Scene". We are going to create an Area2D and add two children nodes. A Sprite2D and a CollisionShape2D . Select the Sprite2D and look in the Inspector dock. Look where it says "Texture <empty>". Click on the little arrow and select "Load..." For this tutorial I chose to load "icon.svg" Next, select the CollisionShape2D. In the Inspector dock, set the Shape to RectangleShape2D . You will notice a group of red dots in the 2D window. Click on these to expand your shape over the sprite. Save the scene and name it so...