Search Unity

How to use mesh collider?

Discussion in 'Physics' started by Vitoria90, Sep 16, 2019.

  1. Vitoria90

    Vitoria90

    Joined:
    Dec 12, 2018
    Posts:
    1
    My asset is a very low poly tank. I wanted to use its own mesh as a collider, but I can't seem to get it to work at all. It collides with nothing and nothing collides with it unless I make it convex, which loses the majority of the shape of the model. Is there no way to just use the mesh as the collider?
     
  2. alexeu

    alexeu

    Joined:
    Jan 24, 2016
    Posts:
    118
    In the mesh collider component you have a property called "Mesh". Did you put a mesh reference in this field.?
    It's maybe still empty...
     
  3. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,554
    Colliders must be convex in order to collide with other non-convex colliders. That's a requirement of the physics engine (PhysX).

    If enabling Convex doesn't give you a proper shape (i.e. the tank cannon causes everything to grow) then you should break down the tank mesh into smaller pieces, add colliders to them and mark all these colliders as Convex.