Just curious if we can set the normals of a box collider.
My scenario is that i created my house in blender and imported into unity. And i have to place box colliders on each wall. (Either that, or mesh collider… if it is cheaper) I was wondering if i can put a single box collider per room, so that i am “inside” the collider… the collider’s normals are turned “inside” instead of “outside”?
On a secondary (related) question, Does having several box colliders impact performance? I mean, is there a performance penalty just “having” all those colliders, not exactly colliding into it?
Hi, you cannot turn the collider inside out. Also Mesh Colliders are not cheap, stick to primitives wherever possible. Don’t worry about having multiple Box Colliders, games are mostly built out of many primitive colliders like the Box Collider. Use one for each wall, floor etc (Do not make them or your walls too thin. This can result in objects passing through them with relative ease).
Indeed as @MrSoad pointed out you cannot turn a collider inside out. The way I’ve dealt with the situation before was to create a simpler mesh with the correct normals and add a mesh collider to it and no renderer. This way you have both a rendered geometry and a collider geometry, so it might be little harder to maintain.