Lab 2 - Personal Project Events & Interactions
Tutorial
·
Beginner
·
+10XP
·
120 mins
·
(127)
Unity Technologies

By the end of this lab, your personal project will have most of its core functionality.
This lab will draw on skills learned in the following lessons:
This challenge is part of the Create with VR course.
Languages available:
Overview Video
1. Fill in Design Document for events & interactions
Before you resume work on your project, you need a plan for what you’re actually going to work on. You will continue filling out your design document so you have a clear plan of action for this lab.
1. Pick up where you left off with your design document:
- Re-open the document you created during Lab 1.
2. Fill out Section 4 (Events and Interactions) of the document:
- Determine if you will be using direct interactors, ray interactors, or both, including how you would toggle between them.
- Describe the haptic / audio feedback, as well as any other 3D sounds you expect in your scene
- List specific object Activation functionality, where if the user is holding an object and presses the trigger, something will happen.
- Describe the main menu of the app, including what can be done from that menu.
- If relevant, describe other UI elements in the scene.
3. (Optional) Add more specific details to your design document:
- Fill out section 6 (Other features)
- Fill out section 7 (Sketch)
- Fill out section 8 (Timeline)
You should now have section 4 of your Design Document complete, providing direction for this lab where you will be implementing your app’s core functionality .
Related resources:
2. Add haptics and audio
For all of the interactors set up on our controllers, add audio and haptic feedback.
1. Add haptic feedback to your controllers:
- Follow the instructions in the Audio and Haptics tutorial.
2. Add audio feedback to your controllers:
- Follow the instructions in the Audio and Haptics tutorial..
3. Add 3D / ambient feedback to the environment, including the use of Reverb Zones:
- Follow the instructions in the Audio and Haptics tutorial..
You should now experience haptic and/or audio feedback on desired events with your controllers. There should also be 3D environmental sound in your scene.
3. Implement event-based interactions
If you have any event-based interactions planned for your app (e.g. when you press the trigger, when the scene loads, when you tilt an object, etc), take the time to get those functional now.
1. To add Activation events for certain objects in your app:
- Follow the instructions in the Activation Events tutorial.
2. To add additional event-based functionality to the scene:
- Add actions to other interaction events such as OnHoverEntered, OnSelectEntered, etc.
- Add new events from the Course Library > Scripts folder such as OnButtonPress, OnSceneLoad, OnTilt, etc.
You should now have core event-based functionality implemented in your app.
4. Set up controller interactors and layers
If you plan on using a combination of Ray and Direct Interactors, you need to set those up for each hand, and if relevant, the ability to toggle between them.
1. To implement interactors for each hand:
- Follow the instructions in the Direct and Ray Interactors tutorial.
2. To configure layers so that each interactor can only interact with specific interactables:
- Follow the instructions in the Direct and Ray Interactors tutorial.
You should have the appropriate interactors implemented for each hand, including the ability to toggle between them. Using layers, these interactors should only be able to interact with appropriate objects (i.e. sockets can only receive specific objects, rays not being able to grab certain objects, etc).
5. Create a main menu UI
One User Interface (UI) nearly all apps should have is some kind of main menu UI.
1. Create a simple main menu UI:
- Follow instructions in the User Interface tutorial.
2. To add a reset screen UI:
- Follow instructions in the User Interface tutorial.
3. To add additional in-world UI screen:
- Create additional world space canvases and display them in relevant contexts for the user.
You should now have at least one main menu UI, which the user can click out of, a reset screen, and any additional UIs required for the functionality of your app.
6. Recap
New Functionality:
- Haptic and Audio feedback
- 3D environmental audio
- Event-based interactions such as activating objects
- Direct and Ray interactors on controllers
- Worldspace UI screens
New Concepts & Skills:
- Applying more complex interactions in your own VR app.
Next Lab:
- Optimization & Lighting