---
title: "Challenge — MR Interaction"
content_type: tutorial
url: "https://learn.unity.com/course/mr-functionality/tutorial/challenge-mr-interaction-1?language=en"
language: en
container_type: course
container_title: "MR Functionality"
container_url: "https://learn.unity.com/course/mr-functionality.md?language=en&version=2018.4"
standalone_markdown_url: "https://learn.unity.com/tutorial/challenge-mr-interaction-1.md?language=en&version=2018.4"
previous_title: "MR Interaction"
previous_url: "https://learn.unity.com/course/mr-functionality/tutorial/module-mr-interaction?language=en&version=2018.4"
previous_markdown_url: "https://learn.unity.com/course/mr-functionality/tutorial/module-mr-interaction.md?language=en&version=2018.4"
next_title: "Challenge — Interactive UI Menus"
next_url: "https://learn.unity.com/course/mr-functionality/tutorial/challenge-interactive-ui-menus-4?language=en&version=2018.4"
next_markdown_url: "https://learn.unity.com/course/mr-functionality/tutorial/challenge-interactive-ui-menus-4.md?language=en&version=2018.4"
difficulty: beginner
duration_minutes: 30
unity_version:
  - "2018.4"
supported_unity_versions:
  - name: "2018.4"
    url: "https://learn.unity.com/course/mr-functionality/tutorial/challenge-mr-interaction-1.md?language=en&version=2018.4"
last_updated: "2026-08-04T14:22:46.000Z"
---

# Challenge — MR Interaction

Use HoloLens interactions to display data about a Rover and manipulate it within a mixed reality scene.

In this challenge, you will display information about and manipulate a Rover using HoloLens interactions.

## Overview

In this challenge, you will display information about and manipulate a Rover using HoloLens interactions.

To do so, you’ll need to:

1. Set up your Scene for Mixed Reality development
2. Configure PointerEnter Gaze controls
3. Configure PointerExit Gaze controls
4. Display information to the user when they click on the intractable object
5. Configure the PointerClick event to hide display information
6. Create a Voice Manager to handle keyword inputs
7. Add voice controls to the Rover to recenter the object on command
8. Add the ability to scale and rotate the object

## Set Up Your Scene for Mixed Reality Development

1. Open the **Mixed Reality Scene Settings** window (**Mixed Reality Toolkit** > **Configure** > **Apply Mixed Reality Scene Settings**).
2. Check the following checkboxes and leave the others unchecked.
3. Click **Apply**.

![Check these boxes](https://connect-mediagw.unity.com/h1/20200316/learn/images/06a7fc84-0cc2-44d2-8fa7-064ed9fc7dc7_Unity_2019_01_18_11_08_26.png)

## Add a Highlight Material to the Sphere

_Add the Event Trigger component to the Interaction Sphere and configure its Mesh Renderer Material to highlight upon gaze._

![Adding event triggers](https://connect-mediagw.unity.com/h1/20200316/learn/images/8ed7097f-0294-424b-b297-7302a5039fd0_2019_01_18_10_09_02.gif)

1. Select the **Interaction Sphere** in the Hierarchy.
2. In the Inspector, click **Add Component**, then search for and select the **Event Trigger** to add it to the GameObject.
3. Add a **Pointer Enter Event** by clicking **Add New Event Type** and selecting **PointerEnter**.
4. Add a Unity Event by clicking the **+** button in the bottom-right corner.
5. Drag the **Interaction Sphere GameObject** into the GameObject slot.
6. In the function drop-down, select **MeshRenderer** > **Material**. In the Material field, select **Highlight Material**.

\--------------------

**Tip — Indicating Interaction**

Highlighting an object is a common design pattern to indicate interactivity. If one can interact with an object, typically there will be some type of feedback as one gets close to that object. Sometimes it’s visual feedback; other times it’s haptic or auditory feedback.

For this challenge, we use visual feedback to signal interactivity and do so by changing the Material upon gaze.

## Implement the Return State after the Highlight Interaction

_Add the Pointer Exit Event to the Interaction Sphere and configure it so the object returns to the default Material when the user looks looks away._

![Adding anther event trigger](https://connect-mediagw.unity.com/h1/20200316/learn/images/cf8c73d4-c81f-401b-a3a7-76f921e82f1f_2019_01_18_10_10_34.gif)

1. Select the **Interaction Sphere** in the Hierarchy.
2. Add a **Pointer Exit Event** by clicking **Add New Event Type** and selecting **PointerExit**.
3. Add a Unity Event by clicking the **+** button in the bottom-right corner.
4. In the GameObject slot, select the **Interaction Sphere GameObject**.
5. In the function drop-down, select **MeshRenderer** > **Material**, and in the **Material Field**, select **Default Material**.
6. Test it out!

## Display Information During an Air Tap

_Configure the information UI to display with a PointerClick event so the user can access the informational page by airtapping (clicking) on the Sphere._

![Adding a Pointer Click event](https://connect-mediagw.unity.com/h1/20200316/learn/images/ec7c5e80-326d-4c32-8566-4ef464b6ffec_2019_01_18_10_26_54.gif)

1. Select the **Interaction Sphere** in the Hierarchy.
2. Add a **Pointer Click Event** by clicking **Add New Event Type** and selecting **PointerClick**.
3.  Add a Unity event by clicking the **+** button in the bottom-right corner.
4. In the GameObject slot, select the **Informational UI GameObject** (**Interactable Sphere > Information UI**).
5. In the function drop-down, select **GameObject > Enable** and check the box.

## Configure the UI-Disable Interaction

_Configure another PointerClick event to hide, or disable, the informational UI when the user clicks on the page._

1. Select the **Informational UI** (**Interactable Sphere** > **Informational UI**) in the Hierarchy.
2. In the Inspector, click **Add Component**, then search for and select the **Event Trigger** to add to the GameObject.
3. Add a **Pointer Exit** **Event** by clicking **Add New Event Type** and selecting **PointerClick**.
4. Add a Unity Event by clicking the **+** button in the bottom-right corner.
5. In the GameObject slot, select the **Informational UI GameObject**.
6. In the function drop-down, select **GameObject > Enable** and leave the checkbox unchecked.
7. Try it out!

![Testing out the events](https://connect-mediagw.unity.com/h1/20200316/learn/images/52a3d4f0-158c-46f6-9beb-43464781c4d3_2019_01_18_10_38_50.gif)

## Configure Voice Commands with a Keyword

_Create an empty GameObject named Voice Manager, add a Speech Input Source component, and add “recenter” to the keywords list._

![Adding a new empty GameObject](https://connect-mediagw.unity.com/h1/20200316/learn/images/c19b2870-e3bd-4c4e-9fac-a4a6869f12b2_2018_12_10_17_37_31.png)

![Setting up the VoiceManager.](https://connect-mediagw.unity.com/h1/20200316/learn/images/7cd52d20-d1a5-421f-b18b-d71ce42228ea_2018_12_10_17_38_15.gif)

1. Create an empty GameObject (**Create > Empty GameObject**) and name it **VoiceManager**.
2. Add the **Speech Input Source component** by hitting **Add Component**, then searching for and selecting **Speech Input Source**.
3. In the keywords drop-down, hit the **+** button to add a new keyword.
4. In the keyword slot, type **recenter** and leave the **Key Shortcut** as **None** for now.

## Add Voice Control to the Rover

_Add a Speech Input Handler component to the Rover and add the “recenter” keyword to the keywords list. This will allow you to implement functionality when the user says “recenter.”_

1. Add the **Speech Input Handler** to the GameObject by hitting **Add Component**, searching for the **Speech Input Handler**, and double-clicking to select.
2. Add the **recenter** keyword that was declared in the **Speech Input Source** by hitting the **+** button and using the drop-down to select **recenter**.
3. Add a Response event by hitting the **+** button and dragging in the **Rover GameObject**.
4. Add the Recenter functionality to the Response event by using the drop-down to select **Recenter Controller > Recenter**.

Try it out!

![Testing the Recenter command](https://connect-mediagw.unity.com/h1/20200316/learn/images/e5641803-fc0d-46ec-a1ed-af3b8bedc5ed_2019_01_18_10_45_11.gif)

## Add the Ability to Rotate and Scale

_Add the Bounding Box Rig to the Rover and configure the Bounding Box Prefab._

![Adding and setting up the Bounding Box Rig component](https://connect-mediagw.unity.com/h1/20200316/learn/images/ea040588-002a-42e8-a2a9-a3e46e42d09b_2019_01_18_10_49_41.gif)

1. Add the **Bounding Box Rig** to the Rover by hitting **Add Component** and searching for the **Bounding Box Rig.**
2. Find the **BoundingBoxBasic.prefab** (**Holotoolkit > UX > Prefabs > BoundingBoxes > BoundingBoxBasic.prefab**) in the Project view.
3. With the Rover selected, drag the **BoundingBoxBasic.prefab** into the **Bounding Box Prefab** slot on the **Bounding Box Rig** component.

![Drag the Prefab to this field](https://connect-mediagw.unity.com/h1/20200316/learn/images/b507d9b0-a3b4-4361-843d-60a5de7f5fc6_Screen_Shot_2018_08_17_at_7.19.13_PM.png)

![The Bounding Box Prefab field set up correctly](https://connect-mediagw.unity.com/h1/20200316/learn/images/1054ecbb-153f-4750-a275-93b50e548b2f_Screen_Shot_2018_08_17_at_7.20.09_PM__1_.png)

## Key Takeaways

Congratulations! You've now configured the Mars Rover to work with HoloLens interaction. The interaction patterns integrated in this challenge are the most common types of HoloLens interaction and are especially useful in pre-authored training applications.

By completing this challenge, you've learned core HoloLens interactions:

1. In-editor HoloLens interaction simulation
2. Gaze interactions to highlight interactable objects
3. Gestures to display additional information
4. Voice commands to recenter the object of interest
5. Use the Bounding Box Prefab to rotate and scale the object of interest with the HoloLens
