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. I teamed up with Radu-Adrian Marcu and Tyler Haskins on this project. Took care of the backend coding and animations.
This project is a technical demo, showcasing the potential of using 2D graphics to build the 3D scenes for VR use by making a 2 minutes short VR experience with some user interactions.
VR scenes 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 surrounded 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 orders in layers for these sprites.
Anima2D is used here to create the bone animations for the characters
Gaze pointer interactions
Since Google VR SDK does not come with any simple, open and useful method to implement the interactions between the player and the game objects by using the gaze pointer, I have developed a pattern to simplify the implementation, and also standardise the behaviour of each interaction.
This pattern is separated 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 Execute(), OnHover(), and 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 an open-source project, so feel free to use the code. No license is applied to this project yet, but remember that you are not allowed to include the graphic assets contain in our repository as those graphics are owned by our client.