- Home /
Mesh Collider with multiple meshes?
Hey guys. I've created a 3D model in blender, which should be the level in my scene. Now I try to add colliders so my first person controller can walk on it. For this I used a Mesh Collider which works fine but the mesh of the model was divided into 4 parts automatically so I can only choose one of those for the Mesh Collider and this is logically not the whole model. Is there any way to apply a Mesh Collider on the whole level in this case?
Answer by scarletshark · Jul 16, 2013 at 05:54 PM
Use the "Generate Colliders" function in the model import options in Unity. This will make mesh colliders for you. Do this by clicking the model in the project folder, and clicking "Generate Colliders."
Alternatively, if you want the collider to be slightly different than the model you imported, you should make a separate "collider" mesh which is comprised of all of the models. Do this by combining all of the meshes in Blender. Select them all and press Ctl+J
, then export them as "[modelname]_collder" and assign it to the mesh collider component of your model.
Also, just FYI: unless you have a reason to have separate models, it is optimum if all models containing the same shader are combined. This reduces draw calls.
I'm having difficulty finding the "Generate Colliders" option. Right-clicking on the .fbx in my project window (it is in the Prefabs directory) gives me a menu that starts with
Create
Show in Explorer
Open
Delete
...
Your answer
Follow this Question
Related Questions
How do I use a mesh collider With .blend? 3 Answers
Convex mesh collider thinks model is non manifold but it isn't 1 Answer
Missing meshes when importing fbx from Blender 5 Answers
Level Creation, Prefabs and Colliders 2 Answers
Box mesh exhibiting odd collision with 1st person controller - how to fix? 2 Answers