diy mobile vr with unity 3d & cardboard sdk
TRANSCRIPT
![Page 1: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/1.jpg)
DIY Mobile VR with Unity & Cardboard SDK
![Page 2: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/2.jpg)
Dr James BirtAssistant Professor of Interactive Media and Design (Games & Multimedia)• BIT (Hons), PhD (Software Engineering &
Artificial Intelligence)• 2014 Australian Office for Learning and
Teaching Citation for Outstanding Contribution to Student Learning
• 15+ years industry & academic experience• https://bond.edu.au/profile/dr-james-birt
![Page 3: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/3.jpg)
Setup - What do you need?
Unity 5 - https://unity3d.com/ Google Cardboard SDK for Unity - https://developers.google.com/cardboard/unity/download
Hardware:- Android Phone – E.g. Samsung S6 - Head Mounted Cardboard – E.g.
ColorCross - Bluetooth Controller – E.g. PlayStation 4
First Person Character Controller - https://dl.dropboxusercontent.com/u/9011716/Character%20Controllers.zip
![Page 4: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/4.jpg)
Create New Project
Create the project in your own folder location
1
2
![Page 5: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/5.jpg)
• Download First Person Character Controller from - https://dl.dropboxusercontent.com/u/9011716/Character%20Controllers.zip
• Unzip the controller into your Assets Folder as shown
Add Character Controller
![Page 6: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/6.jpg)
Add Cardboard SDK1
2
https://developers.google.com/cardboard/unity/download
![Page 7: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/7.jpg)
Create a Test Scene
Be mindful of your Frame Rates try to reduce your lighting overheads
![Page 8: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/8.jpg)
Build Cardboard Controller (Part1)
1. Add FPSController Prefab to your Hierarchy
2. Set the FPSController object Transform to align with your scene
![Page 9: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/9.jpg)
Build Cardboard Controller (Part2)
1. Add CardboardMain Prefab to you Hierarchy and child to your FPSController
2. Set the CardboardMain object Transform to the same values as the FPSController Camera
3. Remove the Main Camera from the FPSController & Hierarchy
![Page 10: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/10.jpg)
Build Cardboard Controller (Part3)
1. Move the Cardboard Head (Script) From Head to First Person Controller
2. Turn off Track Position
3. Set Update Early
These steps will allow you to move in the direction your character controller is facing
![Page 11: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/11.jpg)
Connect Your PS4 Controller1. On controller hold down Share & PS buttons until light bar flashes
white
2. On Android device, enable Bluetooth, then select the “Wireless Controller” option listed. Once connected you will notice you can use the controller to navigate your device
![Page 12: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/12.jpg)
Set Build Settings for Android
1
2
3 4
5
Add your app details settings I have left as
default
![Page 13: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/13.jpg)
Remap Controller Buttons
• Please note: Different android devices will map the PlayStation buttons differently
• You will need to experiment with the button controls and actions
• This list is for PC only
![Page 14: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/14.jpg)
Build to Your Android Device
1
For details on how to setup your Android phone:http://www.slideshare.net/jamesbirt35/visualisation-interactive-prototyping-with-unity3d
2
![Page 15: DIY Mobile VR with Unity 3d & Cardboard SDK](https://reader036.vdocuments.site/reader036/viewer/2022062412/587412511a28abcb5b8b49c7/html5/thumbnails/15.jpg)
Demo Scene
To make your lighting dynamic try adding the following JavaScript code to your directional light & set your speed variable e.g. 5