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 to store ar point cloud data with positions?

Discussion in 'AR' started by Sakuna-Madushanka, Oct 15, 2021.

  1. Sakuna-Madushanka

    Sakuna-Madushanka

    Joined:
    Sep 27, 2021
    Posts:
    1
    Hello everyone, I want to store and access AR cloud points as mention to create separate convex hulls for different planes. I have tried couple of things but there is no luck of storing them.

    Code (CSharp):
    1. private void Update()
    2.     {
    3.         _arPointCloud = arSessionOrigin.trackablesParent.GetComponentInChildren<ARPointCloud>();
    4.  
    5.         if (_arPointCloud == null)
    6.         {
    7.             _arPointCloud = arSessionOrigin.trackablesParent.GetComponentInChildren<ARPointCloud>();
    8.         }
    9.         else
    10.         {
    11.             if (_arPointCloud.confidenceValues.GetValueOrDefault().IsCreated)
    12.             {
    13.                 _featurePoints = new List<Vector3>(_arPointCloud.positions);
    14.             }
    15.         }
    16.        
    17.         if (_arPointCloud.positions.HasValue)
    18.         {
    19.             text.text = "Length : " + _featurePoints.Count;
    20.         }
    21.     }
    How should I proceed to achieve this?