Search Unity

How to show a message if feature points are less?

Discussion in 'AR' started by zyonneo, May 25, 2019.

  1. zyonneo

    zyonneo

    Joined:
    Apr 13, 2018
    Posts:
    386
    I am trying to build an app using ARKit with persistence.So I would like to show a message if they did not get enough feature points.
    Code (CSharp):
    1. if(aRCamera.trackingReason==ARTrackingStateReason.ARTrackingStateReasonInsufficientFeatures)
    2.         {
    3.             SaveText("Less Feature Points");
    4.  
    5.         }
    6.  
    The above code works only if we hide the camera.But I want is like it should support enough feature points so that next time just scanning in a casual way should create a persistence experience.I think enough feature points would help.So i dint get enough feature points in my scan I need to show a message.So the feature points for the tracking the desired path/particluar space has to be 90% anything less than that value show a toast.Any luck?