Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Remove Camera Feed or make it transparent

Discussion in 'Unity MARS' started by inessaid888, Feb 11, 2022.

  1. inessaid888

    inessaid888

    Joined:
    Jan 23, 2021
    Posts:
    1
    Hello,

    I'm working on a Unity MARS project and I'm using the body tracking feature. I want to find a way to either remove the camera feed or make its texture transparent. I only want to have an 3d object mirroring my movements without showing the real physical environment.

    I hope that makes sense! Let me know if you have any pointers. Thank you so much!
     
  2. CiaranWills

    CiaranWills

    Unity Technologies

    Joined:
    Apr 24, 2020
    Posts:
    198
    Mars is adding an ARCameraBackground to the camera - I was able to turn that off by adding a simple script attached to the camera Game Object:

    Code (CSharp):
    1. using UnityEngine;
    2. using UnityEngine.XR.ARFoundation;
    3.  
    4. public class DisableBackground : MonoBehaviour
    5. {
    6.     void Start()
    7.     {
    8.         GetComponent<ARCameraBackground>().enabled = false;
    9.     }
    10. }
    11.