- Home /
Duplicate Question
How efficient are Mesh Colliders?
So I have a lot of nice level geometry for a platformer but now I have to add colliders. Most of the geometry is like something you'd see a couple generations ago, and my target platform is PC. Creating simplified collider meshes would take a really long time, and so would making lots of primitive colliders. I wonder if it would be just as well to create colliders from the level meshes.
Are mesh colliders efficient enough that entire levels could use them?
"Creating simplified collider meshes would take a really long time" Life's tough, you have to do that. It's called "making video games". This has been asked 1000000 times. Use them for ground surfaces, that's it
Answer by Anxo · May 22, 2014 at 09:03 PM
Avoid where possible. There are times, (when geo is some kind of round concave where you need to have a mesh collider but when you can go without it, it would be wise to do so.
Answer by Bunnybomb7670 · May 22, 2014 at 10:09 PM
Mesh Colliders are quite useful for complex geometry, I use them often when working with complex Voxel Terrain. I however noticed that they do have quite a big computation time when they are originally generated, however after that they perform pretty well. Mesh Colliders will have trouble colliding with other Mesh Colliders unless they are marked as convex ( 255 or less vertices ) so it is really upto you.
I'm curious if it's safe to mark any old mesh collider as convex. If the shape itself is actually concave, what happens? Some collision engines might produce unexpected results.
Follow this Question
Related Questions
Mesh collider cost 1 Answer
Too many colliders? 0 Answers
Animated Mesh and Moving Colliders 1 Answer
Detecting object inside an area. 1 Answer
Problem with convex Mesh Colliders 0 Answers