- Home /
How do I use a mesh collider With .blend?
I have a really simple question, but I can't find any documentation and after about three hours of trying to work it out... I started Unity yesterday, and am trying out the model import from Blender. The model was originally made in Sketchup but imported into Blender as I have seen suggested multiple times on the internet. It's now in the .blend format, and has been imported into Unity, with a mesh collider. How do I get the mesh for the collider? I can't find anything on there. I am looking to make the first person controller collide with the object. Thanks for your patience in answering this (I imagine) very simple question.
Answer by clunk47 · Jan 01, 2013 at 08:28 PM
If you can see the house, that is your mesh. All you have to do is go to Component > Physics > Mesh Collider, it will automatically use the mesh that is already there. Mesh colliders need to be convex if they will be colliding with other mesh Colliders. Another way would be to select the .blend model in the project view, and under inspector options, check "Generate Colliders". Don't set convex if you are going to walk inside the house... Convex makes a collider "solid".
Answer by Owen-Reynolds · Dec 31, 2012 at 09:30 PM
Step one is getting a mesh into Unity, which seems like 80% of your question, and has nothing special to do with using it as a collider. To test, create a Cube game object. Where it says "Mesh Filter" click the circle and see if your new Mesh is in the mesh pop-up window. If it's too small, can't find it ... then just look up regular stuff about importing/setting-up a mesh. I've had trouble with versions of Unity and dot-blend formats not mixing, so export blender out to fbx.
For step two, Mesh colliders are components, from the component drop-down. They can use any existing Mesh as a collider. Where it says Mesh, select your mesh, same as for a model.
As a practical matter, you may want to make a very low-poly version of the "real" mesh to use as the mesh collider.
Your answer
Follow this Question
Related Questions
Why is my mesh collider not the same shape as the mesh of the object? 1 Answer
Technique to find a mesh intersecting with a primitive solid without using colliders? 0 Answers
MeshCollider (concave) doesn't trigger OnCollision functions 0 Answers
Sticking object on mesh 0 Answers
Make a Good Collider on Blender import? 2 Answers