Game Development Reference
In-Depth Information
Figure 7-29. The Instantiate function options
This is where you will make use of a “Zombie Zone” to come up with a random location and
orientation for the critters. You could hard-code the location, of course, but set up will be easier and
more flexible if you create a bounding box from which to pull the location and dimensions.
1.
Create a cube in the garden area, and name it Zombie Zone .
2.
Set its collider to Is Trigger.
3.
Turn off its Mesh Renderer, and scale it to cover the inside garden area, just
inside the walls (Figure 7-30 ).
Figure 7-30. The Zombie Zone
The height doesn't matter, as you will only be using its x and z dimensions.
 
Search WWH ::




Custom Search