Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question How can I disable Point Cloud on the ground in AR Foundation?

Discussion in 'AR' started by Sakuwwz, Nov 17, 2021.

  1. Sakuwwz


    Nov 5, 2018
    I'm using ARPointCloudManager to display point clouds and ARPlaneManager to display planes of an AR Scene. I have tried to store the ar points in an array as,
    Code (CSharp):
    1. Dictionary<ulong, Vector3> points = new Dictionary<ulong, Vector3>();
    2. var positions = m_PointCloud.positions.Value;
    3. if (m_PointCloud.identifiers.HasValue)
    4. {
    5.        var identifiers = m_PointCloud.identifiers.Value;
    6.        for (int i = 0; i < positions.Length; ++i)
    7.        {
    8.               if (point.y >= 0f)
    9.               {
    10.                       m_Points[identifiers[i]] = positions[i];
    11.               }      
    12.       }
    13. }
    I've tried eliminating the points by checking the y value of the position but it's not working. It's removing all the points at the same time. Can someone help me to figure this out?

    Thank you in advance for your assistance.
    Last edited: Nov 17, 2021