Pads and doors

Let's begin this example by adding a DoorHuge prefab to our level. In case we place the door without any pressure pad, this door will block the player as if it was a wall, not letting the character cross to the other side. Here's the graphic representation:

We will learn how to use the dialog boxes later in this book.

So, in order to activate the door and open it, we will have to add a pressure pad to our level. We need to consider that the path to this pad needs to be accessible for the character, as if not, the door will never open, because the player won't be able to step on the pad:

If we just add the pad, we won't be ...

Get Hands-On Game Development without Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.