- Home /
How do i code a Mesh collider ?
Hello i have learnt how to code mesh but how do i code a mesh collider?
Answer by OutOfRam · Sep 20, 2016 at 02:56 AM
I don't know if I fully understand your question. Mesh coliders are not coded, but rather they are meshes(models) If you want to make a mesh collider what you need to do is first add the componant to the game object, then add a mesh to the mesh collider componant. If you want to make a custom mesh, I'd suggest using blender, maya or any other 3d modeling software you are comfortable with. any modle you create and import into unity should be usable as a mesh colider. With that being said though, you should try your best to avoid using mesh coliders. I know that they seem like the best option, but they require an extreme amount of processing power compared to the other coliders that are available. A much mor computationally sound approach is to use a compound colider(many simple colliders acting as one).
I hope this helps