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

Collider for Cylinder Object

Discussion in 'Physics' started by Cazil, Jan 19, 2021.

  1. Cazil

    Cazil

    Joined:
    Apr 18, 2014
    Posts:
    6
    Hi all! First time posting in the forums.

    I am making a game where the player controls a tire. I want it to roll forward and backward, and be able to tilt and fall over. Here is the model for my tire:



    I'm very lost on how to approximate its collision. I was using a mesh collider, but when it starts rolling the model is too bumpy and the tire starts to pitch and falls over. It's also too narrow for a capsule collider, and I would still need flat ends.

    Am I stuck just upping the poly count on the mesh collider at the cost of performance?
    Thank you!
     

    Attached Files:

  2. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    2,497
    Yes, increase the poly count as much as necessary until you're satisfied with the result. The performance cost won't be relevant. There's no cylinder primitive available in the 3D physics engine, so that's the only choice.