Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to solve the passthrough problem? #2

Open
nongzhang opened this issue Sep 11, 2023 · 1 comment
Open

How to solve the passthrough problem? #2

nongzhang opened this issue Sep 11, 2023 · 1 comment

Comments

@nongzhang
Copy link

nongzhang commented Sep 11, 2023

I suspect MRTK2.8 and Oculus Intergration don't work well together. My scene is a cylindrical courtyard model with the camera and UI panel in it. I want to switch between passthrough mode and non-passthrough mode. when use Underlay, click a button, hide the cylindrical model,the outside is black,not reality background. when use Overlay and set Opacity 0.3, there is a slight passthrough effect In the courtyard model, this is not i wanted, i need absolute VR experience.Is there any way to solve this? Maybe should use MRTK 3?
And when changing overlayType or textureOpacity in code, it doesn't work.

public void SetPassthroughOrNot()
    {
        if (environment.activeSelf)
        {
            passthroughLayer.overlayType = OVROverlay.OverlayType.Overlay;
            passthroughLayer.textureOpacity = 0.3f;
            environment.SetActive(false);
        }
        else
        {
            passthroughLayer.overlayType = OVROverlay.OverlayType.Underlay;
            passthroughLayer.textureOpacity = 1.0f;
            environment.SetActive(true);
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants