0

I'm a beginner, take it easy on me.

How would you measure the area of the floor using ARCore/Unity. I figure you somehow measure the area of the plane visualiser, or measure the area of each individual triangle, but I have no idea how to attack it.

The closest thing I can find is measuring distance...

Laggsy
  • 1

1 Answers1

0

You can get a (somewhat imprecise) estimate by multiplying

plane.getExtentX() * plane.getExtentZ();

This is most likely too high because it assumes the plane to be rectangular and will suffer from measurement errors in both directions. But it might be good enough depending on your usecase.

A slightly more precise alternative would be to get the plane's polygon

plane.getPolygon()

and then computing the polygon's area

PhilLab
  • 4,777
  • 1
  • 25
  • 77
  • Thanks for getting back to me. That link looks useful too. I'll try this when I get a chance and report back. – Laggsy Apr 14 '18 at 04:14