Mesh collider vs box collider (39038)

hi all quick question if i use a mesh collider on a normal primative box is that the same as if i used a box collider.

just asking as im doing a large building template in blender and then making it into a single object and then importing into unity.
as its all with primative boxes the mesh collider should just act as if im making a load of box collider shouldnt it, just trying to save time but not if its going to drain my performance.

im building for ios so its everything.

2 Answers

2

No, a mesh collider in the shape of a box is not the same thing as a box collider; it’s still a mesh collider and is therefore slower. A single complex mesh collider may or may not be as fast as many box colliders, but it would be easier to work with.

well i think seeing as im working with ios, mesh colliders are not a good idea. didnt know if normal colliders like a box was just replicating the mesh of a box but i guess not.

–

Sounds like you are making a complex mesh just using boxes right? Maybe another way to do it, but what I would do is have a Start script recurse through the object hierarchy replacing the mesh colliders with box colliders (assuming they were imported), or just create box colliders that match up to your boxes. Is your building resulting in a hierarchy of box meshes? Or do you combine all the meshes into one? Or submeshes?

put them into one mesh per different room, suppose ill just have to put box colliders everywhere. im thinking now with doing that i might as well leave all the cubes as separate objects instead of making one big mesh just so i can select em all at once and click add box collider.

–

Ah yes, I keep forgetting we can multi-edit now.

–

yep ive only been using unity for the best part of year, so i only know how annoying it used to be for a brief time.

–