- Home /
Detecting 2D Mesh Collision
I'm currently working on a 2D game with procedural cave generation (based on SebLague's tutorial series), and I am having problems detecting a collision between my cave and another Game Object. I have a Map Generator object, which procedurally generates a mesh, which is stored in a child object, Cave Mesh. It also creates EdgeCollider2Ds for all the edges of the cave.
I have tried checking whether the Game Object's position is in the bounds of the edge colliders, as well as the bounds of the Cave Mesh's MeshFilter's mesh, however didn't get any usable results. I'm running out of ideas, and I'd greatly appreciate some help. All I really want to check is whether my Game Object is "touching" the mesh marked when I select the Cave Mesh (image 2). Thanks in advance.
Your answer
![](https://koobas.hobune.stream/wayback/20220612050020im_/https://answers.unity.com/themes/thub/images/avi.jpg)