Google Cardboard VR with Unity Navigation / Pathfinding
Simple scripts for adding Unity Navigation and Pathfinding to Google Cardboard VR.
Direct Download Link to Unity Package (.unitypackage): https://github.com/pepwuper/Google-Cardboard-VR-Navigation/raw/master/GoogleCardboardVRNavigationForUnity.unitypackage
This works with Google Cardboard Unity SDK. Import the SDK into your project before using this.
To Set Up NavMesh for Google Cardboard VR:
- Make sure the GazePointer control is set up. (See Google Cardboard Demo scene for more info)
- Add FollowPlayer to CardboardMain prefab
- Add a player game object to the scene. Assign the player game object to the Player variable onFollowPlayer
- (optional) Also add FollowPlayer to the Canvas object in the Cardboard VR demo scene and assign the player gameobject to the Player variable if you want the menu to be at the player’s feet at all times
- Add PlayerMotor* to player
- Assign the GazePointer gameobject to the Cursor variable
- Set up nevmesh on the floor
- Add an Event Trigger to the floor object
- Add a “Pointer Click” event
- Assign Player to the Object field, Select “Runtime Only”, then Select “PlayerMotor” -> “SetDestinationToCursor”