Interaction Advanced I

Explore detailed interactions in VR, including audio and haptic feedback, visual effects, and dynamic hand switching using Interactor events.

Toward the end of the previous lesson, we touched upon the Interaction events for an Interactable (e.g., in the case of a Simple Interactable). In this lesson, we’ll discuss the Interaction events in detail and also observe their limitations.

Interaction events

The XRI Toolkit defines a set of states for Interactables: Hover, Select, and Activate. Interaction events are events that are triggered when a state change occurs. These events are defined for both the Interactable and Interactor. So, let’s have a look at them.

Interactor (controllers) events: Hover and Select

The XRI Toolkit provides three interfaces to hook into the Interactor events. We’ll discuss them one by one.

Audio event handlers

The “Audio Events” section in the Interactor lists the events that can play audio when triggered, as shown below:

In our case, we’d like to trigger two different audios when we hover over an Interactable or when we select an Interactable. The audios are provided in the package below:

OnHover.mp3
OnSelect.mp3

Since we now have the audios in our project assets, we’ll attach the OnHover.mp3 audio with the “On Hover Entered” event and the OnSelect.mp3 audio with the “On Select Entered” event to the Ray Interactors of both controllers.

...