January 2

Unity 3D make your own VR Game

This is my own tutorial on how to make a VR game its been done so many times before me but all the tutorials have shitty controls or are outdated.

Here is a sample of a game i did but controls on android device are screwed by the autowalk script i used so need to create my own.

So lets start form scratsh and make en new tutorial that would work with Unity 5.0.0p2 (64-bit)
and Latest Google Cardboard SDK from the Github

Setting up Cardboard

  1. Download the latest version of Unity.
  2. Download the Cardboard SDK for Unity.
  3. Download the Cardboard Demo for Unity.
  4. Download the Android SDK if you don’t already have it. The “SDK Tools Only” option is sufficient.
    Follow theinstallation instructions up to and including “Get the latest SDK tools”.
  5. Open Unity, creating a new project

Also lets download the extra controllers
Requires Unity 4.6.3 or higher.

Cardboard Controls+ is all you need to develop the best Cardboard games in Unity.
These scripts enhance Google’s official Cardboard SDK for Unity with event-driven improvements for discrete magnet control,
orientation tilting, and gaze raycasting. Stop limiting your creative options!
Usage

You may experience problems if you import the code manually without using the provided unitypackage file.

Import them like show below
import them

Controls+ Demo APK download

Unity forgot the Y

Today I was having a problem getting a first person control to work in Unity for Google Cardboard. I had done it once but could not remember how to do it again. The problem I was having was that once the controller was attached to head i has just falling through the terrain. I attached the controller to the camera (but not the head) and this would solve the problem of falling through the terrain, but the head was not attached to the controller so movement was set in the start and would not change based on head movement.

My solution to the problem, once you have added a first person control delete its camera. Put it under CardboardMain and all cameras under the first person control. Add a component to the First Person Control. This component should be the CardBoard Head (script). Next uncheck the Track Position button under the Head (script) you just added, and the Mouse Look (script) also under First Person Control. Finally delete the old Head object in the Hierarchy.

Hope this can save some time with anyone else with this problem,

Couple of Bros


Copyright 2021. All rights reserved.

Posted January 2, 2016 by admin in category "Coding", "DIY", "Games", "Google Cardboard", "Unity3d