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 How can I disable Point Cloud on the ground in AR Foundation?

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

  1. Sakuwwz

    Sakuwwz

    Joined:
    Nov 5, 2018
    Posts:
    50
    Hello,
    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