示例#1
0
    bool HitTestWithResultType(ARPoint point, ARHitTestResultType resultTypes)
    {
        List <ARHitTestResult> hitResults = Session.HitTest(point, resultTypes);

        if (hitResults.Count > 0)
        {
            foreach (var hitResult in hitResults)
            {
                ActiveChild.transform.position = UnityARMatrixOps.GetPosition(hitResult.worldTransform);
                ActiveChild.SetActive(true);
                return(true);
            }
        }
        return(false);
    }