Improve Accuracy/Correctness of AR Hit Tests
By default, ArCore returns hits for planes which are much larger than the actual area detected by
ArCore. This can cause objects to appear to be floating off the edge of a table for example. This
CL changes the algorithm to request ArCore to do a more exact check on planar trackables.
The code also limits hits to planar trackables only, which removes some spurious hits with Point
Clouds. As more trackable types are supported by ArCore we should probably revist this.
Adjust the current hitTest code in the following ways:
1) Ignore all hits on trackables other than Planes
2) Walk the hits returned from AR Core in back to front order
3) When we have found at least one hit, then restrict any subsequent hits we return to those
that are within the polygon which ArCore detected for the plane. We assume the first hit
is the floor and likely to extend beyond the currently detected area.
Bug: 872855
Change-Id: I2649bf10d16b09152f077cd8b9fb2c6fe261162c
Reviewed-on: https://chromium-review.googlesource.com/c/1173446
Commit-Queue: Brice Tebbs <btebbs@chromium.org>
Reviewed-by:
David Dorwin <ddorwin@chromium.org>
Reviewed-by:
Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596081}
Showing
Please register or sign in to comment