Search Unity

Getting the size/Distance of the detected wall using ARCore, How?

Discussion in 'AR/VR (XR) Discussion' started by areebahmedkhan, Jun 26, 2018.

  1. areebahmedkhan

    areebahmedkhan

    Joined:
    Jun 25, 2018
    Posts:
    4
    I want to get the size of the detected wall or any surface, get the dimensions in meters without placing any game object over detected plane. Please help
     
  2. LarryTheBrave

    LarryTheBrave

    Joined:
    Nov 20, 2016
    Posts:
    24
    I am trying to do this myself. I have seen an APP which is pretty accurate measuring with the camera so it can be done. First try getting the distance to the detected plane. I'd place a small actual ruler on the surface and then a GameObject by it to compare the size. Get the "actual" size of the GameObject by having a box collider on it and know what that size is, and assume Unity uses meters. Also realize that ARCore doesn't detect the whole wall, just a polygon portion, and you can also check the bounds of the polygon but then you're just going by Unity units and I know you want the actual in meters.