Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Convex Mesh Problem?!

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

  1. MoistDumpling14

    MoistDumpling14

    Joined:
    Sep 8, 2018
    Posts:
    139
    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:
    2,497
    Some pictures would help to figure it out...
     
    hippocoder likes this.
  3. MoistDumpling14

    MoistDumpling14

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

    MoistDumpling14

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

    MoistDumpling14

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

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    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:
    139
    Oh I didn't know that was a thing. Thanks
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    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:
    139
    Cool
     
  10. MoistDumpling14

    MoistDumpling14

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

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    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.