Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to calculate area of plane in AR Foundation?

Discussion in 'AR' started by Vallar, Oct 4, 2019.

  1. Vallar

    Vallar

    Joined:
    Oct 18, 2012
    Posts:
    177
    Hi,

    Starting to use AR Foundation recently and I was wondering if there is a way to calculate the area of the plane the player chose to place the game's objects on? Also if there is a way to detect if there is some real world object in the middle of the plane?

    Basically what we're trying to do is avoid the player placing the game world on a table (then it is too small for them to navigate) and/or place it where there might be pillars or walls and they may impede the experience.

    This is of course on top of the warning we'll display for the players.

    Any ideas would be great. Thanks.
     
  2. lloydhooson

    lloydhooson

    Joined:
    Apr 7, 2008
    Posts:
    77
    you could you the bounding box of the plane for the size, then you cold have a volume that is placed onto the plane, and if any vertical planes are detected inside those you have your columns. perhaps.
     
  3. Vallar

    Vallar

    Joined:
    Oct 18, 2012
    Posts:
    177
    That is an interesting idea. I'll give it a try, thank you!