Hello, I’ve scoured the internet for answers but could not find any answers to the issue I’m having.
Basically we are developing a game where we will need to create simple primitive convex colliders at runtime.
Generating the mesh is fine, but I’m having an issue with the mesh colliders. I have a simple obtuse box here that will pass through objects on one side.
Image:
http://img207.imageshack.us/img207/9060/25312994.png
There is a normal box with a box Collider under my brown Mesh Collider.
Edit:
I have just discovered that this only happens when the colliders are lined up on the Z axis, if I scale it to be larger or smaller on the Z it collides fine.
Is this a common problem with mesh colliders? Is it possible my mesh is NOT convex?
Just a point in the right direction would be amazing, thanks.
EditEdit:
Just realised the mesh creation tool PolygonTool is creating and setting vertices for each face, this could be the problem but any further information is appreciated.
EditEditEdit:
Well I fixed the code so that a box would have 8 vertices and changed the indices/triangles to reference the new verts. No change in the collision problem.
Answer:
It seems the triangulation from the PolygonTool I purchased works for most situations, but not for this one. I reverted back to my own triangulation and everything seems to be fine.