Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Mesh Collider vs Mesh Collider

Discussion in 'Scripting' started by mehware, Aug 12, 2008.

  1. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Hi I am working on a game where I need two mesh colliders to collide with each other. when they do the one passes through the other one, both are marked as convex, and the docs state "There are some limitations when using the Mesh Collider. Usually, two Mesh Colliders cannot collide with each other. All Mesh Colliders can collide with any primitive Collider. If your mesh is marked as Convex, then it can collide with other Mesh Colliders. "

    I can't use a primitive collider for either one because it won't be accurate.
     
  2. MatthewW

    MatthewW

    Joined:
    Nov 30, 2006
    Posts:
    1,356
    Two convex colliders should be colliding properly. Maybe post a screenshot of settings (cmd-shift4 hotkey)?

    Even if you get the convex colliders working, you may want to consider building your collision geometry with multiple primitives (compound collider).
     
  3. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Its a cornhole/bags game. :)



    The board is separated into 7 different child meshes, the top part though is one mesh a box with a hole in it. The bag is what I definitely want to have a mesh collider for (that's convex).

    If I make the board mesh a box primitive so it can collide with the mesh collider (the bag) then I wouldn't know how to take care of the hole in it. I really want to rely on collisions/physics to make this work.
     
  4. drJones

    drJones

    Joined:
    Oct 19, 2005
    Posts:
    1,351
    hmm - shouldn't the bags be skinned meshes that are basically ragdolls? much more realistic that way i think.

    : )
     
  5. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    The bags will be a ragdoll to be the most realistic. But the Mesh Collider with the hole doesn't work when another mesh Collider hits it. I will look into ragdolls and see if I an fix it.
     
  6. reveriejake

    reveriejake

    Joined:
    Jul 8, 2007
    Posts:
    819
    Try turning convex on for just the bags, and leaving it off for the board.. I will talk to you more later!