Search code examples
androidgeolocationaugmented-reality

Geo Location Augmented Reality detect overlap object


May I know how can I detect whether an object is overlayed behind another object in location based AR. How to calculate this based on gps location information or any other method to prevent them from overlaying each other in android.


Solution

  • I've described a solution for location base AR which will help you to start: https://www.netguru.co/blog/augmented-reality-mobile-android You can find there an algorithm for detecting objects with specific GPS coordinates. For your specific case I would suggest to run calculateTeoreticalAzimuth() method twice for two POIs you want to check. Then based on the distance to the objects and difference between theoretical azimuths you can assess if they overlap themselves. Of course you would need set some kind of satisfying accuracy for the calculations.