Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice
  2. Read here for Unity's latest plans on OpenXR.
    Dismiss Notice

Help Wanted 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?
     
unityunity