- Home /
Capsule Collider and Mesh Collider Collision
I'm making a 2d side scrolling game with a procedurally generated tile map. The map is a mesh with a mesh collider. For testing player collision with the map, I first used a sphere with a sphere collider, which worked wonderfully. When I had my player sprite ready, I slapped a capsule collider on him (It was a better fit) and...trouble.
When he hits the edge of the mesh, he falls about half a unit through, stays there for a second, and then continues falling through the rest of the map. Giving him a different collider fixes the problem, but I'm curious why the capsule collider is failing. the sprite is lined up with the map mesh correctly, it has a rigidbody, and its not falling off to the side. Its going Through the map. Any Ideas?
after 1s...
after 3s...
Answer by Ilgiz · May 05, 2015 at 09:34 PM
what about box collider instead mesh collider?
The map will have holes in it, so I would need individual box colliders for each tile. This seems a little excessive for thousands of tiles