Search Unity

ARCore collider on plane generator

Discussion in 'ARCore' started by robrtoprz, Jul 4, 2018.

  1. robrtoprz

    robrtoprz

    Joined:
    May 15, 2017
    Posts:
    8
    Hi, is there a way to make the generate plane collide with the objects? I'm placing objects in my scene pressing a button but when I place them they falls down.

    I saw that exists the ARCoreUtils, but works with the ARCore v1.1, I didn't get to work with the ARCore v1.3.0.

    Thanks.
     
  2. M00DY

    M00DY

    Joined:
    Sep 5, 2013
    Posts:
    2
    Hello, I am also facing same issue yes in the mid of 2019 :( I have seen and used ARCoreUtils , it works fine for me when instantiating a simple prefab! I am facing a problem when using it in ObjectManipulation scene in ARCore Examples. Unable to instantiate a prefab with default script "AndyPlacementManipulator", while "ObjectManipulationController" and "ManipulationSystem" are active gameobjects in the hierarchy.

    Does anyone found a solution for updated ARCore versions? I am using ARCore v1.9.0!
     
  3. M00DY

    M00DY

    Joined:
    Sep 5, 2013
    Posts:
    2
    After a little struggle.. found a solution! Create a MeshCollider inside a "DetectedPlaneVisualizer.cs" sciprt and assign it as shared mesh.
    //Declare a MeshCollider inside DetectedPlaneVisualizer.cs
    private MeshCollider ar_meshCollider;

    //Initialize inside Awake() function
    ar_meshCollider = GetComponent<MeshCollider>();

    //Assign as shared mesh inside _UpdateMeshIfNeeded() function
    ar_meshCollider.sharedMesh = m_Mesh; //(used for collision detection)


    Or simply just replace this script inside your AR Core Example Project.
     

    Attached Files: