Search Unity

Question How to put ragdoll in car?

Discussion in 'Physics' started by AlexanderL1, Dec 11, 2023.

  1. AlexanderL1

    AlexanderL1

    Joined:
    Feb 21, 2018
    Posts:
    15
    Hello, ragdoll need to collide with interior (not fall through). Car mesh is deforming by move of vertices (colliders no, but I'am planning).
     
  2. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,923
    If your car doesn't have a collider, there's no way other objects (ragdoll or otherwise) will collide with it.
     
  3. AlexanderL1

    AlexanderL1

    Joined:
    Feb 21, 2018
    Posts:
    15
    I mean that car have mesh collider, but I'am only move vertices (without changes on collider vertices). I dunno, how ragdoll be in interior.
     
  4. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,923
    Not sure I understand the problem. Just place the ragdoll inside the car?
     
  5. AlexanderL1

    AlexanderL1

    Joined:
    Feb 21, 2018
    Posts:
    15
    Yes, but it impossible, because mesh collider in convex enabled is limited to 255 triangles (so, it not give free space in interior). Non-convex not allowed for dynamic object since Unity 5.
     
  6. arkano22

    arkano22

    Joined:
    Sep 20, 2012
    Posts:
    1,923
    No need to use a single concave mesh collider for the car, you can use multiple convex ones. That’s the usual approach for most non-trivial dynamic shapes.
     
  7. AlexanderL1

    AlexanderL1

    Joined:
    Feb 21, 2018
    Posts:
    15
    Awesome, I saw this in the "Universal Vehicle Controller", but didn't take it into account. Thanks for help!