Search code examples
unity-game-enginegoogle-cardboard

Moving forward in cardboard using first person controller script


How to add first person character controller in google cardboard so that it moves forward in continuous direction? I know it is stupid question but since I am new and actually made a simple cardboard game just few hours ago.I am not getting how to add first person controller script to my google card board game?


Solution

  • Here is a AutoWalk.cs script from github that I personally use to make my character walk. This script makes the camera (and the binded character) move forward with a simple head tilt or magnet trigger. https://github.com/JuppOtto/Google-Cardboard/blob/master/Autowalk.cs

    NOTE: The code in github is for Google Cardboard SDK. So you will have to modify it a little bit if you want to make it compatible to the latest Google VR SDK (few variable name changes).

    This is however a temporary fix that I recommend as we wait for Google to release DayDream