Project

General

Profile

Into VR » History » Version 2

Hannes Vilhjálmsson, 2019-01-29 17:02

1 1 Hannes Vilhjálmsson
h1. Into VR
2
3
!http://secom.ru.is/images/into-vr-hierarchy.png!
4
5
Procedure
6
7
# *Getting Started* You have to start by importing the following packages:  OculusUtilities (from oculus downloads (Links to an external site.)Links to an external site.), OvrAvatar (from oculus downloads (Links to an external site.)Links to an external site.), VRToolkit (from Asset store), SteamVR (from Asset store) and Prototyping. You will probably need to delete the Samples folder from OvrAvatar to get rid of some compilation errors.
8
# *Create Basic Environment* Add a floor with a material that is easy on the eyes. Put a small cube on it (1m tall), as a table, and a small sphere on top of the cube (20 cm diameter). Make the floor and table static and put under a new empty object called Environment. Put the sphere under a new empty object called Props. Add a comfortable ambient sound to the environment to make you feel you entering a different world. 
9
# *Create Empty VRTK Object Hierarchy* Create 9 Empty Game Objects in the Hierarchy. Arrange and rename them exactly as shown by the lower 9 black and gray objects in the screen shot above (VRTK_SDKManager, SDKSetups, SteamVR, OVR, Simulator, VRTK_Scripts, LeftController, RightController, PlayArea). Make sure the position of all these objects is (0,0,0). Note that they are all still empty!
10
# *Set Up VR SDK Switching*
11 2 Hannes Vilhjálmsson
## Add the VRTK_SDK Manager component to the VRTK_SDKManager object. Add the VRTK_SDK Setup component to each of the SteamVR, OVR and Simulator objects.
12 1 Hannes Vilhjálmsson
# # Do the following to set up the VR Simulator option:
13
# # # From the VRTK->Prefabs project folder drag VRSimulatorCameraRig under the Simulator game object (as child).
14
# # # In the VRTK_SDK Setup component of the Simulator game object, select Simulator from the QuickSelect drop down.
15
# # Do the following to set up the SteamVR (HTC Vive) option:
16
# # # From the SteamVR->Prefabs project folder, drag [CameraRig] and [SteamVR] under the SteamVR game object (as children).
17
# # # In the VRTK_SDK Setup component of the SteamVR game object, select SteamVR from the QuickSelect drop down.
18
# # Do the following to set up the Oculus option:
19
# # # From the OVR->Prefabs project folder drag OVRCameraRig under the OVR game object (as child),
20
# # # From the OvrAvatar->Content->Prefabs project folder drag LocalAvatar under the same OVR game object
21
# # # Select the OVRCameraRig and in the inspector choose Floor Level as the value for Tracking Origin Type
22
# # # Select the LocalAvatar and in the inspector check the Start With Control option (to see the controllers in the world). 
23
# # # In the VRTK_SDK Setup component of the OVR game object, select Oculus from the QuickSelect drop down. 
24
# # In the VRTK_SDK Manager component of the VRTK_SDKManager game object, press Auto Populate to see all of the VR setups listed. The list is in the launch order. If something fails to launch, the next setup will be tried. Therefore, you should drag the Simulator setup to the bottom of the list, so it becomes the fallback if no VR equipment is connected.
25
# # Check the SDK_OCULUS_AVATAR check box in the same VRTK_SDK Manager component.
26
# # From the VRTK->Prefabs project folder drag the SDKSetupSwitcher under the VRTK_SDKManager as a child.
27
# *TEST* You should be able to see your scene in any of the VR setups, including the Simulator. You may want to adjust the position of your camera rigs so that you start standing in front of the table.
28
# *Making Props Grabbable* Add the following components to a prop you want to grab:
29
# # Rigidbody
30
# # VRTK_Interactable Object (check Is Grabbable)
31
# # VRTK_Child Of Controller Grab Attach (drag this component also into the Grab Attach Mechanic Script field of VRTK_Interactable Object)
32
# # VRTK_Outline Object Copy Highlighter
33
# # VRTK_Interact Haptics (Set Strength On Touch to 1 and Duration On Touch to 0.2)
34
# *Activating Controllers* Add the VRTK_Controller Events and VRTK_Interact Touch and VRTK_Interact Grab components to both the LeftController and RightController game objects. Select the VRTK_SDKManager game object and drag the LeftController object into the Left Controller field of the VRTK_SDK Manager component and the RightController object into the Right Controller field.
35
# *TEST* You should be able to pick up your props.
36
# *Adding Teleportation* Do the following:
37
# # To the RightController game object, add the VRTK_Pointer component,
38
# # the same RightController game object, add the VRTK_Bezier Pointer Renderer component.
39
# # Drag the VRTK_Bezier Pointer Renderer component into the Pointer Renderer field of the VRTK_Pointer component.
40
# # To the PlayArea game object, add the VRTK_Basic Teleport component.
41
# # Move your camera rig(s) a bit further back from the table, so you can try teleporting towards it.
42
# *TEST* You should be able to click the touch pad / joystick to make a telaportation arc appear, which takes you to its destination when releasing the pad / joystick. 
43
# *Go Wild!* Add more props. Try different Grab Attach Mechanics. Try different object highlighters. Fiddle with appearance.