Creating a destructible wall
In this section, we will start by creating a destructible wall with multiple cube game objects in the Unity engine, as well as adding some code to the
rocket script to make this wall breakable when the player shoots the rocket to hit it.
We will begin with creating a new tag for our destructible wall:
- Let's go to Edit | Project Settings | Tags to bring out the Inspector view for Tags. In the Inspector view, we will click on the triangle in front of the Tags element and then on the Element 4 type Destructible, as you can see in the following screenshot:
- Next, we will go to GameObject | Create Empty to ...