#Hololens – How to place a Hologram using AirTap and #HoloToolkit

Hello!

2 days ago someone I asked about the best way to create a hologram and place it in the real world using Hololens. Some time ago, I wrote a post with the step by step on how to do this with URHOSharp, and today will go over the steps to do it with the HoloToolkit.

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

  • Delete the default assets Main camera and Directional light
  • Save the scene
  • Adjust the values required to run project of Unity as UWP in Hololens
    • Project Settings / Player
    • Project Settings / Quality
    • File / Build Settings
  • Import HoloToolkit
  • Search in the Holotookit assets and add the following assets
    • MainCamera
    • Spatial Mapping
    • Cursor with Feedback
  • Add an Empty Game, I usually name this one Managers, and add the following components
    • Gaze Manager
    • Gaze Stabilizer
    • Gesture Manager
    • Hands Manager
    • World Anchor Manager
  • Add an Empty Game, I usually name this one HoloCollection
    • Add a hologram in the same
    • Add the following components to the hologram
      • World Anchor Manager
      • Tap to Place

 

The output is similar to the following video, where we can see how the gesture AirTap select a hologram, I move in the space shown with Spatial Mapping and another gesture AirTap position it.

2016 10 10 Hololens move and place object.gif

That’s it for today: I’ve left the step by step and now do not forget me more!

Greetings @ Toronto

El Bruno

References

50 comments

  1. Hi elbruno,

    first of all, thanks so much for your posts =)

    I’m trying to use this “TapToPlace” and seems that the project launchs fine in Hololens, but I can’t see any 3D model (as cube or cylinder). I can see the visual meshes of the mapping, but my “hologram” is not anywhere =(

    Any idea?

    Like

  2. Is there an updated tutorial for this? WorldAnchorManager is now a singleton class so it can’t be added to two objects in one scene. I don’t see GestureManager and HandsManager in the current Hololens Toolkit. And does the CursorWithFeedback prefab require a transform to be in the the Primary Cursor Visual field in the inspector now? I can’t get this TapToPlace function to work at all.

    Like

    1. Hi Ridley,
      You are right, GestureManager and HandsManagers are deprecated in the latest version of the HoloToolkit. I won’t update this post, however I’ll try to write a new post using the new set of managers. Anyways, the code is not so different, so you can get it very fast once you learn the basis of the HoloToolkit.
      Regards
      -Bruno

      Like

  3. Hi,

    Thank You for Your post. It works great for me. I have one problem: the game object (sphere) that I am moving, behaves as it woudn’t have any collider. So when I want to put the sphere on the table it is placed inside it.

    Do You have any idea how to fix it?

    Like

    1. Hi Mark

      Have you added / enabled Spatial Mapping. If so, with a collider the sphere should not pace inside a table (or any other surface detected by the spatial mapping).
      One tip here, is to enable the “Draw mesh” option in Spatial Mapping, so you know the real space detected

      Regards
      -Bruno

      Like

Leave a comment

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