Search code examples
arcore

ARCore : should I track a Plane or an Anchor


I'm not sure of my understanding of ARCore's anchor and planes.

For my application, I'm trying to get the floor coordinate frame, so I wait for a plane, the lower one, and get this plane's center pose as new center of the world.

Should I create an anchor ? What could be the difference between tracking a plane or a anchor ?

Thanks.


Solution

  • What I have found works best is to create an Anchor to handle the x,z location of interest. For the y coordinate use the plane (or an offset from the plane).

    The reasoning behind this is the center of the plan will move as a the understanding of the plane increases and the plane expands. Moving up and down, is good - since you want the plane in your case to be the floor. But since you are setting an origin point fixed in space you probably don't want to jump around left and right, nor forward and backward, so using an anchor for those will be better than the center point of the plane.