Virtual Reality Unity


This repository is associated with the subject Virtual Reality taught in the university School of Arts and Letters by Juan Olaya in the semester 2017.2.

For this course we use Unity 3D 5.6.3f1 and OSVR as VR framework. OSVR is able to run on any Android device provided of a gyroscope and accelerometer. To check if your Android device is compatible, download the Cardboard App. The following are the components required for the course.

1. VR Reticle

The VR Reticle or VR Gaze is useful to interact with GameObjects, as follows:

  • Rotate GameObjects
  • Change Color of GameObjects
  • Destroy GameObjects
  • Drag and Drop 2D/3D GameObjects
  • Add Force to GameObjects (Normal Vector)
  • Impact Effect (Explosion Particles)

2. Moving in VR

For Virtual Reality in this course we focused in First Person Character Controller as movement for the most of the projects. This movement is able to manage with a Bluetooth Controller as is explained below. As well is possible to map the follwing movements:

  • Third Person Character Controller
  • Aircraft/Drone Controller
  • Motorcycle Controller
  • Car Controller

3. Software Patterns

OSVR, as VR framework, allows use concepts such Interactive Item and Eye Raycaster. In order, to use these concepts properly is crucial to add the VR Eye Raycaster script to only one GameObject. For instance, add it to the camera GameObject. Also, add VR Interactive Item script to each GameObject.

Assignment: Identify the software patterns that have been used by these concepts/scripts. Recommended Book: Game Programming Patterns, Nystrom (2014) - Web version

4. Class Diagram

Assignment: Elaborate a Class (Script) Diagram of the Unity project that shows: the relationship among scripts, their attributes, their methods and software patterns. Recommended Book: Object-Oriented Software Engineering: Practical Software Development Using UML and Java

5. Build and Run

Assignment: Install Android Studio in your computer (PC or Mac) and using an Android device compatible with Cardboard, generate an Android app of the Unity VR project and then run the VR app in an Android device. For this assignment is highly recommended use a Cardboard.

In order to enhance the performance of the App, setup the Texture Compression in the Build Settings, as is shown in the following image:

6. Interactive Experience

For the video game is relevant includ the concepts of Game Design, such as: goal of the game, score, rules, awards, vivid interactive storytelling and convinving mechanics. Moreover, is important to enrich the experience of the video game with:

  • Non Player Characters (NPC) from Mixamo
  • Waypoints (to move characters, animals or vehicles around)
  • Textures
  • Physics Simulation
  • Explosion Simulation
  • Sound Effects

7. VR Glasses/Headset and Game Input for the Remote Controller

For this course is highly recommended to get some budget VR Glasses and a Bluetooth Remote Control compatible with Android devices. A device recomended is the VR-PARK Portable Wireless Bluetooth 3.0 Remote Controller and a plastic headset, for instance, the budget VR Box.

In order to map the buttons of the controller with an Unity app running an Android device please check the following information:

8. Agile Development for Video Games (Scrum)

According to the Agile methodologies of development, elaborate a Gantt chart in the online tool TeamGantt that takes into account the follwing components:

  • Game Design Document (GDD)
  • Requirements Elicitation
  • Two Scrum Sprints (2nd and 3rd term each)
  • Final delivery (5 minutes pitch)

Recommended Book: Agile Game Development with Scrum, Keith (2010)

VR Bibliography


The students designed and developed (3) Serious Games and (4) Entertainment Games in the course Virtual Reality taught in the second semester of the year 2017. The video below shows these projects:

Example VR Apps