Boundary
- Sheng hao Wang
- Apr 5, 2016
- 1 min read
To address the issue of bolt taking up resources after been fired. We create a boundary around the game area, so anything that flies off the screen will be destroyed. The first step to create a boundary is adding a 3D cube into the scene and cover the entire game area with it.
The next step is making sure the Is Trigger is toggled under the Box Collider in the inspector, then delete the mash filter and mesh renderer. The reason for deleting the mesh filter and mesh renderer is because all we need is the collider for the boundary, also both of them would block the game view if we don't delete them.
The last step to create the boundary is writing the script in C# to destroy anything that fly off the game area and test it.









Comments