Hey guys, for a project I am doing I need to have a large number of objects for the player to walk into and I was wondering if I can get away with using mesh colliders for all of the objects?
Is there a big performance hit with doing that even though the player will only really be hitting one at a time? I would like to avoid primitive colliders if I can.
Thanks guys,
-Jeremy
Im curious to. What is the performance difference from primitive to mesh and primitive to primitive?
Bill
Usually you use mesh colliders for level geometry anyway, so i can’t see why mesh-primitive collision would slow you down a lot.
It really depends on the use case though.
Ok thanks Joe. That makes things easier.
-Jeremy
Just a small follow up,
is there any difference between the types of Primitive Colliders in terms of performance? I.e. is the box collider faster than the sphere for instance?
/thanks
This thread contains a summary of the relative efficiency of each collider type. The order is:
Simplest / most efficient
Sphere
Capsule
Box
Mesh
Most complex / slowest
thanks neil,
wonder why that didn’t turn up in my search…
/P
Nitpickingly the order is more like this.
Simplest / most efficient
Box
Sphere
Capsule
Mesh
Most complex / slowest
However, it truly don’t matter for primitives. They are for all practical purposes equally fast.
I would assume that if your player collider’s bounds isn’t touching the majority of other collider’s bounds it shouldn’t matter much.