Search Unity

Question Occlusion of virtual objects behind physical wall (AR/XR)

Discussion in 'AR' started by grembek, Sep 28, 2021.

  1. grembek

    grembek

    Joined:
    Jul 16, 2021
    Posts:
    3
    Hi,

    I am trying to achieve an occlusion effect when placing a virtual object behind a physical wall. In order to do so, I located a virtual object 10 meters behind a physical wall which was 1 meter away, and in between the camera and the virtual object. Unfortutallty, the virtual object appeared in front of the physical object and was not hidden behind the wall. How can I achieve an occlusion effect and have the virtual object in the right place?

    Thanks
     
  2. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,822
    grembek likes this.
  3. grembek

    grembek

    Joined:
    Jul 16, 2021
    Posts:
    3
    Thank you for your response. How can I find which devices support depth? Does it mean only devices with Lidar?
     
  4. KyryloKuzyk

    KyryloKuzyk

    Joined:
    Nov 4, 2013
    Posts:
    1,145
    Yes, on iOS, environment depth occlusion is only supported on devices with LiDAR.
    But on Android, this is supported without the LiDAR, all supported devices are marked with 'Supports Depth API':
    https://developers.google.com/ar/devices
     
    Thaina and grembek like this.