How to enable Hololens2 occlusion on Unity?

Abhi Garlapati 1 Reputation point
2022-07-04T20:11:30.707+00:00

I would like objects in my unity project to be occluded by humans and other inanimate objects. The problem I am facing is that the objects in my scene are always superimposed on humans and other opaque objects. Would I have to change Unity editions completely? I am running unity 2020.3.7f. The HoloLens definitely should have capabilities for what I am seeking, but I can't find how to do so.

HoloLens Development
HoloLens Development
HoloLens: A family of Microsoft self-contained, holographic devices that enable engagement with digital content and interaction with holograms in the surrounding environment.Development: The process of researching, productizing, and refining new or existing technologies.
364 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Seth DU - MSFT 541 Reputation points
    2022-07-05T08:08:25.873+00:00

    Hello, welcome to Microsoft Q&A,

    According to https://learn.microsoft.com/en-us/windows/mixed-reality/design/spatial-mapping#occlusion, if you need occlusion for your game object, Spatial Mapping needs to be enabled in your Unity project. Please navigate to [MixedReality Toolkit Component] -> [Spatial Awareness] -> [enable Spatial Awareness System].

    Based on your selected Spatial Observer, you can change the display settings. Choose “Occlusion” from “Visible” in Display Settings to hide MRTK built-in Wireframes.

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.