ARKit (ARWorldTrackingConfiguration) position problem

Viewed 72

I'm kind of new to AR development, but I'm learning more day by day.

Let's say I have a table (dark surface) with white paper squares (8 by 8 cm). My application should recognize these squares (which it already is does).

Problem:

Now let's say I arrange these squares in a 2-dimensional way like in the following image. When seeing this, there are 4 columns and 4 rows.

3 rows, 4 columns of white rectangles

The image is displayed is a perfect straight forward view. So, when the ARScene is in this exact way, I can easily calculate if the x-position + width of a certain node and check whether the x-position of another node lays within these bounds. Same goes for the Z-position (since these papers lay down flat on the table), I can order this by check whether the Z-position of one is higher than another one.

However...

The ARScene starts at a specific position which is basically never positioned above the table. This means that I can never calculate whether a node is within the same x-position in world coordinates compared to another node.


In short...

I basically want to check whether the X-position of a node is equal to the X-position of another node.

I'm kinda struggling to find this out. I hope my question is well described, if not, please let me know!

0 Answers
Related