如何在ARcore中确定垂直或水平平面?

时间:2018-07-14 07:14:20

标签: unity3d arcore

作为标题,我想确定运行时ARcore中的平面是垂直还是水平。 我该怎么办?

1 个答案:

答案 0 :(得分:0)

来自authorized

Plane.Type t = yourPlane.getType();

if(t == Plane.Type.VERTICAL)
  // Vertical plane
else if(t == Plane.Type.Plane.Type HORIZONTAL_DOWNWARD_FACING)
  // Ceiling, camera looking up at
else if(t == Plane.Type.Plane.Type HORIZONTAL_DOWNWARD_FACING)
  // Floor, ground, camera looking down at