Search code examples
swiftaugmented-realityarkitrealitykitreality-composer

Which goal should be chosen for ARCoachingOverlayView when detecting faces or images?


ARCoachingOverlayVew has 4 goal types: horizontalPlane, verticalPlane, anyPlane and tracking.

But the Reality Composer has 5 types of anchor:

enter image description here

Apparently, the first two are for when the horizontal

What mode should I adjust the ARCoachingOverlayVew when I am tracking Image or Face? horizontalPlane, verticalPlane, anyPlane or tracking?


Solution

  • When using ARCoachingOverlayView with ARFaceTrackingConfiguration you should choose tracking case:

    ARCoachingOverlayView.Goal.tracking
    

    And when using ARCoachingOverlayView with ARImageTrackingConfiguration you should choose anyPlane case:

    ARCoachingOverlayView.Goal.anyPlane