Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question 1 Mesh Collider for multiple Meshes

Discussion in 'Physics' started by Night_mre, Sep 10, 2023.

  1. Night_mre

    Night_mre

    Joined:
    Mar 9, 2022
    Posts:
    1
    I am new to Unity and I imported a model made of smaller meshes into unity and gave them textures, however I want to give the model a convex mesh collider but when I do so it starts doing weird things like floating in air or simply rotating with no stop. Is it possible I can give all the meshes a singular mesh collider?
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,861
    No, as that would require re-generating the collider from scratch every time any of the objects move which would be extremely costly.

    But you can have multiple MeshColliders for a single Rigidbody, which accomplishes the exact same thing. Just parent all your MeshColliders under an object that has the Rigidbody component.

    On a side note, giving a convex MeshCollider to an object will not cause it to float or rotate non-stop. There's clearly something else going on.