Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Adjusting the depth texture within AROcclusionManager

Discussion in 'AR/VR (XR) Discussion' started by jonah85, Apr 27, 2020.

  1. jonah85


    Nov 6, 2019
    I am new to the forum and still a bit of a beginner, but am looking to use the AROcclusionManager in a way that the user's hand will always be in front of the virtual objects present in the scene when it is in view, rather than disappearing behind the virtual objects..

    Can this be done in the AROcclusionManager by making changes to the HumanDepthTextureInfo separate from the HumanStencilTextureInfo, and if so how would I approach this?

    Alternatively, it appears that the humanStencilTexture and depthStencilTexture are created as public textures from the data so is it possible to use the humanStencilTexture alongside a copy of the user's hand (copying the ARCameraBackground I presume) and add this on the top of the displayed camera view. If so any help on how to approach this would be greatly appreciated.