I've made a mesh from an SVG in Blender and converted it to a mesh. I then put it into Unity, to put a collider on it, the mesh does not collide with anything, even with convex ticked.
Here is my collider:
And here is my mesh in Blender (blue is the outside of the mesh):
What the convex collider looks like:
Can someone tell me why the collider is not working? Cheers!
CodePudding user response:
When working with Colliders and 2D, make sure you have the following:
- RigidBody2D
- Collider2D
and when scripting, ensure you are using OnCollisionEnter2D(Collider2D col){}
CodePudding user response:
The MeshCollider is implemented in the 3D Physics engine and therefore incompatible with the 2D Physics engine. They simply don't interact.
What you probably want to use instead is the PolygonCollider2D