Search Unity

AR Kit plane collisions

Discussion in 'AR' started by MadeFromPolygons, Mar 6, 2018.

  1. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,977
    For some reason I cannot get collisions with ar plane anchors to occur. I have added a box collider to the debugplane prefab and am using generate planes object from the examples but any rigidbody I place goes straight through the plane object as if there are no collisions occuring.


    What am I doing wrong, and how did you get collisions working for AR planes / make plane objects collidable?

    EDIT: I am a professional unity developer so this is not a misunderstanding of how the physics system in unity works (such as not having rigidbodies etc etc), but I do believe it may be down to incorrect use of positions from the unity matrix ops class.

    Explaining how you initially position a collidable game object, over a collidable plane anchor specifically for AR kit (any differences between this and normal placement in a non-arkit app) may help too
     
    Last edited: Mar 6, 2018
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,977
    Turned out the collision plane prefab sets its y collider size to 0 when placed and running.

    Made a new prefab and stopped happening.

    Can lock this thread.