...
/Interaction Advanced II: Hover and Select Events
Interaction Advanced II: Hover and Select Events
Learn to enhance VR interactions using Interactable events for Hover and Select states by adding visual and audio effects.
In the previous lesson, we learned that Interaction events enabled us to add customized behavior to Interactions between Interactors and Interactables. We studied different types of Interactor events: audio events, haptic events, and customized Interactor events. In this lesson, we’ll dive into Interactable events that allow us to customize the behaviors of Interactables when their state changes.
Interactable events: Hover and Select
In the case of Interactables, the XRI Toolkit provides a single interface to hook into Interactable events. We can generalize the events for both the Hover and Select states as shown in the table below:
Interactable Event Types
Event Type | Description | Args Type |
First <State> Entered | This event is fired in the frame when an Interactor changes the state of this Interactable to <State> from some other state. |
|
Last <State> Exited | This event is fired in the frame whenever an Interactor tries to change the state of the Interactable from <State> to some other state, and the state changes. |
|
<State> Entered | This event is fired in the frame whenever an Interactor tries to change the state of this Interactable to <State>. |
|
<State> Exited | This event is fired in the frame whenever an Interactor tries to change the state of the Interactable from <State> to some other state, regardless of whether the state change takes place or not. |
|
We’ll demonstrate the usage of these events for the Hover state. The same rules are also applicable in the Select state use cases.
Add effects via Hover events
Up till this point, we added effects on the Interactor. So, now, we’ll add effects on the Interactables as well. We’ve provided the effects for the ...