#Hololens – Creating a menu with options with #HoloToolkit

Hello!

Comes time to perform a backup of some of the sutff I’ve learned about Hololens and HoloToolkit. This one is related to a basic feature in any app

Present a menu and select an item. In Hololens using AirTap

The idea is to view a board with different options, and the option selected will be displayed in a top 3D text

Holo Select Menu 04.gif

In previous posts I have already commented on how to create a Unity3D project and how to import the HoloToolkit. From here, the following steps would be

  • Delete default assets: Main camera & Directional light
  • Save Scene
  • Adjust UWP projects settings to be Hololens capable
    • Project Settings / Player
    • Project Settings / Quality
    • File / Build Settings
  • Import HoloToolkit
  • Add Assets
    • Main Camera
    • Spatial Mapping
    • Cursor With Feedback
  • Create Empty and Rename > Managers
    • Add Components
      • Gaze Managers
      • Gaze Stabilizer
      • Gesture Managers
      • Hands Manager
    • Add Assets
  • Create Empty and Rename > HoloCollection
    • Add Assets
      • Add Cube, add SAD image to cube
      • Add Cube, add HAPPY image to cube
      • Add Sphere, add SAD image to sphere
      • Add Sphere, add HAPPY image to sphere
      • Add 3D Text, name “TextResult”

The components hierarchy should be similar to the following

clipboard02

And now is the moment to create some interaction feature. So a single script called “EmojiSelector” will do the magic

clipboard05

In this script I would add a couple of lines in the OnSelect operation. This operation is is called from the GestureManager when performing an AirTap on a selected item. The Script obtains the item selected from the GazeManager and if it is valid, displays the name in the Text called “ResultText” 3D.

Greetings @ Toronto

El Bruno

References

Advertisement

38 comments

Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: