Game Development Reference
In-Depth Information
In the current set up, you will use colliders to turn the two areas off and on at either side of the gate.
Because the gate walls can be common to multiple areas, you will begin by putting them in their own
groups.
1.
Create 3 Empty gameObjects, and name them Common Wall 1 , Common
Wall 2 , and Common Wall 3 .
Although the order doesn't really matter, let's consider Common Wall 1 to be the far side of the
Staging Area, Common Wall 2 to be the wall between the garden and staging area, and Common
Wall 3 to be the far side of the garden.
2.
In a top view, position the empty gameObjects with their future contents.
3.
For each gate wall, select the Garden Gates, Gateway, Raised Walkway, and
the two Pillar Corners and Gate Walls.
4.
Put them into the appropriate group (Figure 7-18 ).
Figure 7-18. Common Wall 2 selected
5.
Rename CornerGarden to Garden 1 .
Occluder Logic
The logic and layout is simple, but you may have to go through it in your head a few times to
reassure yourself that it will work. There will be two colliders on either side of each gateway. They
will be set to Is Trigger. As you approach a gateway and go through the outer collider, the area on the
other side will be deactivated. (It is already deactivated at this point.) When you go through the inner
 
Search WWH ::




Custom Search