måndag 5 augusti 2019

VR - The beginning

I have started looking in to VR. So far I've succeeded in creating a red cube - yay!

This is seriously a reaööy good stat tutorial for devolping on the Oculus Quest.

Valem - How to make an OCULUS QUEST game

Steps:
  • Download and install Unity: Unity
  • In Unity/Installs: Add Unity Version
    • Next: add module Android Build Support and Android SDK & NDK Tools
    • Next: stuff is downloaded and installed...
  •  In Unity/Projects: New
    • Select Unity version
    • Select 3D
    • Set Project Name
    • Click on Create: The project is created...
  •  In the Unity top panel: Window/Asset Store
    • Search for Oculus Integration
    • Select Oculus Integration
    • Download Oculus Integration...
    • Import Oculus Integration...
  • In the Unity Scene window or Hierarchy window:
    • Select the Main camera and delete it
  • In the Unity Hierarchy window:
    • Right click and select 3D Object/Plane
    • Right click and select 3D Object/Cube
  •  In the Unity Project window:
    • Right click and select Create/Material
    • Name the material "Red"
    • Click on "Red", then in the Inspector window, use the picker to set the colour to red
    • Drag "Red" (from the Project window) to the Cube (in the Scene or Hierarchy window)
  • In the Unity Project window:
    • Search for OVRPlayerController
    • Drag the OVRPlayerController to the Scene or Hierarchy window
  • In the Unity Project window:
    • Search for LocalAvatar
    • Drag the LocalAvatar to OVRPlayerController/OVRCameraRig/TrackingSpace (in the Hierarchy window)
  •  In the Unity top panel: Select File/Build Settings
    • Click on Add Open Scenes
    • Select Platform Android
    • Click on Player Settings (also available in Unity top panel Edit/Project Settings/Player)
    • In Player Settings/XR Settings, click + and select Oculus
    • In Player Settings/Other Settings/Graphics APIs, select Vulcan and press - to remove it
    • In Player Settings/Other Settings/Minimum API Level, select API Level 19 or higher
  • In you smartphone Oculus app:
    • Connect to the Oculus Quest
    • Select More Settings/Developer Mode and enable it
  • Connect your Oculus Quest head set to your computer
    • In the O.Q. head set, allow USB debugging
  • In the Unity top panel, select File/Build And Run
    • Wait for the build to finish...
  • Put on the Oculus Quest head set and... Boom! A red cube in VR Space!
    • Press the Oculus button to quit the application
    • To run the test application later, go to Library/Other applications in your Oculus Quest head set

If the hands are not showing up in VR:
Since 25/07, the new version 1.39 of the Oculus Integration has changed how the Local Avatar works.
Here is the fix: On the Unity top panel go to Oculus / Avatars / Edit Settings. Add an Oculus App id to the Quest setting. Any number will work but if you want to publish to the Oculus store you need to create a real Oculus App Id on their developer website, https://dashboard.oculus.com/

tisdag 19 mars 2019