问题
I tried to place an object on face. But does not understand how to set depth in object.
Like when I add 3d object like spects frames on face.
It does not show in correct depth.
回答1:
When you use Augmented Faces feature, it's worth to note that if any face is detected, ARCore at first puts a Face Anchor (which must be located behind a nose or, more precise to say, inside a skull), and secondly ARCore puts a canonical mask – its pivot point resides on the same place as anchor does.
Hence, if you wanna place your glasses at the appropriate depth – set a pivot point of your 3D object the same way it was set on a canonical mask. In other words – marry these pivot points.
来源:https://stackoverflow.com/questions/59640401/arcore-object-does-not-show-in-correct-depth-in-face-augmentation