Exercise 1
Rube Goldberg/Dominoes Assignment
In this lesson students will build a Rube Goldberg/dominoes falling over thing. Have the final step actually do something. Examples: open a curtain to show a picture, turn a page of a book, pour water in a glass or some equally simple task. Students need to use their imaginations and/or ideas from the examples below. Some of the examples are pretty 2D. Students can do the same or expand it into 3D. Be sure to use the camera on a track to have the camera move through the world.
Here are some ideas. #4 is fascinating but it would take some major time and effort to build a world like that.
Build something like this https://youtu.be/_LUG_EMPczk
Some good ideas here. https://youtu.be/ntWRTjSl3BI
Too simple and horrible camera work but still some ideas. https://youtu.be/QhIkL3sq36Y
Fascinating. https://youtu.be/MAe61rsXJRk
Interesting textures. https://youtu.be/Ngfus6TdT8w
Requirements:
At least two levels (planes). A ball or domino will fall from a higher to a lower level and hit something on the lower level to continue the process.
At least 5 dominoes knocking each other over.
Ball (or something) flips at least one teeter totter.
All objects have a color or texture.
Camera follows the action.
At least one spinning object.
At least one swinging thing on a chain.
At least one set of hinged objects like hanging panels. https://youtu.be/_LUG_EMPczk .
A simple final task at the end. Examples of a simple task are: turn a page in a book, put bread in a toaster, turn on a light switch, open a curtain to show a picture, and so on. Get clever.
Grading:
10 pts for each requirement. (90 possible)
5 - Assets are organized in folders.
10 - All requirements are met.
0-10 - Is cool. This is a bit subjective.
Total possible points possible 115.
Notes:
Install Unity Hub and Unity version
The first time takes some careful reading. First Unity Hub needs to be installed. The actual Unity application is installed through the Hub. Installation will require the acquisition of a free license. If using BYOD work through this with the class. It is best if the teacher has a computer that has never had Unity installed on it. Use one of the student's computers. Install at least a 2019 version. Versions 2020, 2021 and 2022 may have some updates that can make tutorials unreliable. Do not be deterred by this, students learn more when things do not go smoothly.
Create a new project
In Unity Hub create a new 3D project. It is very important at this point to discuss the file location of the new project. The students need to understand the importance of creating a new project file folder and to know where it is located. The project folder cannot be created on Google Drive so it is important to demonstrate a backup method. This can be done by Zipping the project folder and storing that on Google Drive. This would be a good time to discuss project versioning and creating their own versioning system. It is very important at this point to explain that they need to make a copy of the project, rename it with a new version number, before they start the day's work. If something goes wrong they then have the previous day's version as backup.
Familiarize with Unity GUI
Do a show and tell with the class. Point out the main windows: Scene, Game, Hierarchy, Project and Inspector. Discuss alternate Layouts and how to move and park windows.
Build primitives
Demonstrate where primates are found (GameObject > 3D Object or right-click in Hierarchy) and how to place them in the scene. At this point show how to use the widgets in the upper left to move, rotate, resize, etc. and show how to use the qwerty shortcut keys. Discuss the list of primitives. Use reshaped cubes for the dominoes and ramps for the ball (sphere) to roll down. Either a plane or a flattened cube will work for the platforms to build the levels on. If the dominoes do not fall over easily, make them thinner.
Use Physics
In order for objects to react to gravity (balls roll down ramps, dominoes fall over, etc.) the object must have a Rigidbody. In the Inspector window select Add Component at the bottom. Type "rig" in the search field. Rigidbody will appear in the dropdown. Select it (do not use 2D unless building in 2D). Examine the options in the Rigidbody Inspector. Changing the Mass can have an effect on how objects behave.
Construct monochrome color materials
Make a Materials folder in Assets. Right click on the materials folder. Create > Material. Give the New Material the name of the color. Select the white rectangle next to "Albedo" in the Inspector window. A color wheel should appear. Select a color using the color circle and tint square. Drag and drop the color material onto the Object to be that color.
Import materials from Unity Asset Store
Go to the Unity Asset Store tab. If the tab is not there go to Window > Asset Store. Search for "Yughues Free". This is a huge number of free textures. Look through the free assets and download and import the desired asset. Use a lot of trial and error to find the best texture. Drag and drop it onto an object in the Scene or Hierarchy.
Camera follows the ball
If we do not make the camera follow the ball the scene is over pretty quick. The solution to this used to require a C# script to manage the camera and to do anything like switching between multiple cameras could be confusing. The introduction of Unity Cinemachine has made complex camera movement comparatively simple. Here is a short YouTube video on how to build camera tracks and camera transitions. https://youtu.be/Reh2kGwwFHs. This video introduces both Cinemachine and Timeline. Working together they can make professional looking camera movements and transitions easily.
Using Joints to make hinges, springs and chains
Joints lock objects together, make swinging gates, water wheels, chains, ropes, and other spinning objects. Here are a number of videos with instructions on how to use the various joint types.
https://youtu.be/MElbAwhMvTc - all joints
https://youtu.be/f4xikqJdkwM - all joints
https://youtu.be/GB8BdFjX8vM - all joints
https://youtu.be/PeFIqErdDoM - Rope bridge and wrecking ball