Difference between revisions of "Unity + VR"

From __space Wiki
Jump to: navigation, search
(Created page with "This page will be further updated when The [Learn Unity First] guide is finished, but for now, if you'd like to quickly get started with making a project using the Vive and Un...")
(No difference)

Revision as of 15:43, 15 June 2017

This page will be further updated when The [Learn Unity First] guide is finished, but for now, if you'd like to quickly get started with making a project using the Vive and Unity, these are some tips and a little bit about setting this kind of project up.

Getting Started: Edit>Project Settings> Player, which brings up something in the inspector, go to Other Settings and check off the Virtual Reality Supported box.

Use the plus icon to add OpenVR to the list of Virtual Reality SDKs (Doesn’t matter if Oculus is in that list or not). Window> Asset Store> search for SteamVR, download and import that plugin. In the SteamVR folder that appears in the Project tab when it finishes importing, find the __ folder, and drag the __ file from there to the hierarchy.

Using Teleportation to move: in the Hierarchy tab, go to the controller you would like to give the teleport ability to, and then in the Inspector tab, look for the Add Component button, and start typing in teleport, add the SteamVR-Teleport script. to be able to see where you’ll be teleporting also add the SteamVR-Laser Pointer script. Make sure to test before moving on.

picking up objects (requires some coding): use this tutorial: http://learn.vrdev.school/courses/vive-developer-mini/lectures/853978 , they explain it best. for getting distance between controllers via script can actually just find the controller game object and get its transform.position and distance between things is (using c# but it’s very similar in javascript) Vector3.Distance(object1.transform.position, object2.transform.position) can use FixedJoints to attach any objects, and delete it on command. another very useful guide for unity +vive (I used it for ui stuff)

Small issues and the solutions I've found: on new update of unity (5.6) vive controllers stopped working. To fix, just drag the “SteamVR_UpdatePoses” script onto Camera (eye) [make sure it’s eye, not head]