- Home /
Mesh Collider on a 2D mesh creating a 3D box?
Hi,
To model collisions between 2D shapes for which I do not have an import sprite, I have defined new meshes in C# and used Triangulator (http://wiki.unity3d.com/index.php?title=Triangulator) to create the mesh triangles.
Within the inspector the mesh and its triangles are visible (accurate to shape), but within game the mesh collider is rendering a 3d box which encapsulates the shape rather than giving the mesh shape which is being applied (mesh is rendered correctly and the same asset is passed both to the filter and the collider).
Not sure if this is relevant but I set the sharedMesh and the filter within the prefabs' Awake() method.
Supposedly, but I don't see why it should behave any different. I'm looking if someone can tell my why this is the case, or if they can use mesh collider in 2D without the above behaviour.
Your answer
Follow this Question
Related Questions
Trouble with Inaccurate Mesh Collider 0 Answers
Correct position of overlapping meshes 0 Answers
Mesh Collision system seems to be buggy. 1 Answer