Anima is a mobile VR project developed for Questionable Quality Ltd.. The project aims to explore the possibility to use 2D assets in a VR environment. In this project, I teamed up with Radu-Adrian Marcu and Tyler Haskins, handled the backend coding and animations.
The project is a just a technical demo, shows that we can use 2D graphics only to build up a 3D scene for VR use by providing a ~2 minutes short film with a few user interactions.
- Unity 5.6.0f3
- Google Cardboard
VR scene with 2D graphics only
In order to build a scene for VR with 2D graphics only, we chose to make a circular scene which has the player fixed at the centre surrounding by the sprites.
To simulate the depth of the forest, we simply duplicated the trees to place them in 3 different levels, and set different order in layer for these sprites.
Anima2D has been use here to create the bone animations for the characters
Gaze pointer interactions
Since Google VR SDK does not come with any simple, open and use method to implement the interactions between player and the game objects by using the gaze pointer, I made a pattern to simplify the implementation, and also standardise the behaviour of each interaction.
This pattern is splited into 2 parts, the player side and the game object side.
First, on the player side, the player object of each scene can simply apply the
GvrPointerHoverEvent to set up the progress indicator which will show up while the gaze pointer enters the object.
Then, on the game object side, you need to create a script that extends the
GazeHoverBehaviour, and override
OnHoverExit() to implement your own actions.
Lastly, attach the script you just created to the game object, indicate the player object for the script, then go to Event Trigger, set
OnGazePointerEnter() for event PointerEnter, and
OnGazePointerExit() for event PointerExit.
PS: This pattern is far from perfect yet imo. I’ll try to make a standalone release on Unity Asset Store when I’m free.
- GitHub: iamWing/UnityVR_Anima
Our client is nice enough to let us make this a opensource project, so feel free to use the code. No license is applied to this project, just remember that you are not allowed to include the graphic assets contain in our repository as those graphics are my client’s work.