November 12, 2018
11.11.2018 – Creating Hotspots in Unity w/ GVR Video Texture
Posted by cfitzsim under UncategorizedNo Comments
When using the GVR Video Texture to render 360 video in Unity, there is no built-in way of creating hotspots. When using GVR Video Texture for rendering 360 video, you can place GameObjects within the 360 video sphere; however, those GameObjects will not be hit by raycast. That results in GameObjects being displayed, but not being interactable, and obviously hotspots need to be interactable to be useful. The solution we found was using a UI element (we picked a button) and masking it so it appears invisible. The invisible button can then be placed over an area in your video to make that area interactable. By using event triggers and C# scripting, you can change what happens when you interact with the hotspots.
In our prototype, we have hotspots on each person within the 360 footage. When the user points at a hotspot, the reticle (cursor) animates so the user knows they can click to interact with it. We may also add some audio cues (“Click here to talk…”). When the user clicks, three options will come up for how the user can interact with the person in the scene. Each option is worth either 1, 2 or 3 points depending on the quality of the option. When the user selects an option, a new 360 video plays to show the person’s response to the user’s decision. Then, a new set of hotspots appear for the player to repeat this process.
By adding hotspots, we can make the game more interactive and allow the user to give a more organic response as opposed to simply presenting them with a multiple choice quiz with a video background.
The data we need to display all of this information is in a class called Questions, which contains the text for the questions and answers, the point value associated with each answer, the audio clips for reading aloud to the user, as well as the paths to the next videos that play and the next question which will be displayed based on their choice.
The text, audio and video clip data are mapped to the appropriate UI button element through the QuestionDisplay script.
Leave a Reply