Search Unity

Access GameObject of BoundedPlane

Discussion in 'AR' started by rxmarccall, Aug 31, 2018.

  1. rxmarccall

    rxmarccall

    Joined:
    Oct 13, 2011
    Posts:
    353
    This probably has a simple solution, but I'm having a hard time figuring out how I can access the GameObject off a BoundedPlane trackable.

    The reason I want to do this is so that I can access the Mesh Collider on the plane and toggle it On / Off.

    Any ideas of how I can do this?
     
  2. tdmowrer

    tdmowrer

    Joined:
    Apr 21, 2017
    Posts:
    605
    A BoundedPlane is just a struct. You probably want the ARPlane component. The ARPlaneManager let's you look them up by TrackableId. From there you can get the MeshCollider if the plane prefab you specified in the plane manager has one.
     
    rxmarccall likes this.