O'Reilly logo

Unity 4 Game Development HOTSHOT by Jate Wittayabundit

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

Prepare for lift off

We will begin with creating a new tag for our destructible wall:

  1. 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:
    Prepare for lift off
  2. Next, we will go to GameObject | Create Empty to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required