So, we have accomplished the organization and simple importing processes. That wasn't much of a challenge, was it? Well, now it is time for something with a little more substance.
In this section, we will build seven trigger colliders so that our application will register a score when they are hit by the balls. We will then write a simple script that tells the application manager to change the score based on the trigger that was hit.
To start, we need somewhere to put our collection of collider boxes. As we did with UI and Static Lights earlier in the chapter, create an empty child object of skee, called TargetColliders.
The scoring system in our game will be the classic 10, 20, 30, 40, 50, 100. We will start with 10 and build and copy till we are done. Look at the following steps:
- Right-click on the TargetColliders GameObject in the Hierarchy view.
- Click on 3D Object.
- Then, select Cube as the type of 3D object to create:
- In the Inspector, change the object's name to 10Collider:
- In the Inspector view, we need to change the transform of the object, as follows:
- Position X: -155.2 Y: 65.7 Z: -43.99997
- Rotation X: 35.86 Y:0 Z:0
- Scale X: 31 Y:31 Z: 31
- Click on the checkbox labeled IsTrigger:
- Uncheck the checkbox that says Mesh Renderer: