Search Unity

Convex Mesh Problem?!

Discussion in 'Physics' started by MoistDumpling14, Jan 8, 2019.

  1. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
    Hey everyone, I am using a mesh collider to wrap around this cone that will get run into by a moving ball. I dont want to use a box collider cause that will not work for what I am doing. I have made the mesh and there is an option for convex. The problem is that when I don't tick this box the cone just passes through the ground and has no collisions, however, when I check the convex mark, the collisions work just fine but, the cone does not tip over when it collides with the ball that is hitting it. I mean with enough force it does move but it does not act the same with the mesh collider as it does with say a box collider. The box collider on the other hand works just fine.
     
  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,375
    Some pictures would help to figure it out...
     
    hippocoder likes this.
  3. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
    What does convex mean
     
  4. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
  5. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    24,702
    Probably worth clicking the blue book icon a lot, and reading manual where it's available for additional learning.
     
    MoistDumpling14 likes this.
  7. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
    Oh I didn't know that was a thing. Thanks
     
  8. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    24,702
    Yeah you can tell it to go to a link with a line of code even in your own scripts. Some scripts will not have that implemented but typically the Unity ones do.
     
    MoistDumpling14 likes this.
  9. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
    Cool
     
  10. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    104
    Just to clarify I can assume that box colliders and primitive meshes are convex correct?
     
  11. SparrowsNest

    SparrowsNest

    Joined:
    Apr 6, 2017
    Posts:
    1,273
    No need to assume, they are convex.

    One trick is to make a compond collider for a complex shape by have multiple primitivs as child colliders for the rigidbody instead of a mesh collider.
    Sometime you need it to be concave(the opposite of convex) but still want it dynamic, a thing that unity doesnt support
     
    MoistDumpling14 likes this.