Skip to main content
‹ Back to Tutorials
Intermediate Unity

Unity VR XR Interaction Toolkit - Adding Audio Feedback

Aug 17, 2022
About this tutorial

In this Unity VR XR Toolkit tutorial, I'll show adding audio feedback for the controllers when you select an object. This allows for giving user feedback from sight, feel (haptic feedback) and now sound. Using 3 of the 5 senses. ► Audio Assets - https://kenney.nl ► Art Assets - Polygon City - Low

Written Guide

The XR Interaction Toolkit series has already covered looking at the world and feeling it through haptics. This tutorial adds a third sense: hearing. When the player grabs an object, a sound plays as confirmation - a small touch that makes VR interactions feel dramatically more physical. Setup takes just a few minutes.

Where audio events live

On both the left hand and right hand controllers, scroll down the XR Ray Interactor in the Inspector. Just past the haptic events covered in the previous tutorial sits an Audio Events section. Like haptics, audio can fire on different interaction moments. This setup skips the hover event and uses Select Entered instead - the moment an object is actually grabbed - so the sound specifically marks a successful grab rather than the ray merely passing over something.

Step 1 - Get some sounds

You need audio clips before you can play them. A great free source is kenny.nl: go to Assets, then Audio, and you will find free packs Kenny has posted that you can use in your game - interface sounds, UI audio, digital audio, and more. For this project the interface sounds pack was downloaded and imported into Unity under a sounds folder with a UI sounds subfolder. Select any clip in the project to preview it and pick candidates you like.

Step 2 - Wire a clip to the grab event

On each controller, go down to the XR Ray Interactor and its audio events, enable the Select Entered event, and drag one of the clips into the audio clip to play slot - this setup uses the clip named select 001. Do the same on both the left and right hand controllers so a grab sounds identical in either hand. That is the entire wiring: no scripting, no audio source management, the toolkit handles playback.

Step 3 - Test it

Enter play mode and grab something. The moment the object is selected, the sound fires - instant audible confirmation the grab succeeded, without the player needing to look. Combined with the earlier tutorials, interactions now engage three of the five senses: sight through the visuals, touch through controller haptics, and hearing through audio feedback. Layered together, these small cues are what make picking up a virtual object feel like an event rather than a state change.

Unity tools by Bliz Studio
Built for our own games — now on the Asset Store

Multi Tag — unlimited hierarchical tags for any GameObject. Hierarchy Pro — style your whole hierarchy with rules. Made by a Unity dev, for Unity devs.

Explore our Unity assets →