15: Mining for Diamonds (Part 3)
Completion requirements
Step 1:
Make a submission
Due: Friday, January 23, 2026, 11:59 PM
Learning Target
- Enable the user to move around the scene with a keyboard or mouse
- Add the ability to select objects in a scene
Resources
Starter Scripts
-
- CameraController.cs (updated 1/7/2026)
- Drill.cs
- GameController.cs
- UIController.cs (updated 1/8/2026)
Instructions
Step 1:
Add the Quick Outline package by Chris Nolet from the Unity Asset Store.
Be sure to add the outline to the drill prefab so it is ready to use. Later, this will show us what drill is currently selected.
Step 2:
-
- Create a scripts subfolder in your assets folder.
- Add the CameraController class to your project.
- Attach the CameraController script to your main scene camera.
- You will need to figure out the proper bounds for your scene by moving your camera around the scene in edit mode.
- Some of the functionality of CameraController is disabled until you add custom input axes (Elevation, Rotation, Tilt).
- Play the game and try it out. You will likely need to adjust your settings!
Step 3:
-
- Add the Drill class to your project.
You'll notice the use of "[SerializeField]".
We make the variables private to protect them from accidental changes in our code.
However, private variables are not visible in the Unity Editor unless they are serialized.
Being able to see their values helps with debugging. - Add the Drill script to your Drill prefab.
- Start the project and make sure the drill head is rotating.
- Complete the TODO tasks before moving to the future steps of the assignment.
Use the methods already written for you to help you add the missing TODO methods. - Make sure that you can change the rotation speed from within the Unity Inspector while the game is running.
- Add the Drill class to your project.
Step 3:
-
- Create a "Controller" empty game object in your scene.
- Add the GameController class to your project. It also uses "[SerializeField]" for debugging.
- Complete the TODO tasks before moving on.
- Add the GameController to your "Controller" game object.
- Run your game and check that you can select and deselect drills by clicking on them. You should see an outline appear on the selected drill.
Step 4:
Lastly, we want to make sure our UI always reflects what is going on in our scene.
-
- Add the UIController class to your project's controller object.
- Complete the TODO tasks.
- Add your UIController to your new scene object.
- Run the game. Check that there are no errors. Change some variables and see if the UI changes.
Grading
For grades A to D, all requirements need to be met for that grade band.
| Indicators and Collectibles | Grade |
|
110% |
|
100% |
|
90% |
|
80% |
|
70% |
|
60% |
| Not submitted or does not meet above criteria | F |