Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice

Question ArticulationBody Continuous Collision Detection only for primitive colliders?

Discussion in 'Physics' started by codebiscuits, Nov 27, 2023.

  1. codebiscuits

    codebiscuits

    Joined:
    Jun 16, 2020
    Posts:
    86
    Hi,
    ArticulationBody.collisionDetectionMode says "You can use Continuous Collision Detection only for ArticulationBodies with Sphere-, Capsule- or BoxColliders.".
    Is there some way I can tell what type of collider my AritculationBody has? Do I just search all of my colliders & look at their Collider.attachedArticulationBody?

    E.g., I see Collider.attachedArticulationBody says "Colliders are automatically connected to the articulation body attached to the same game object or attached to any parent game object." << So this implies to me that each collider is connected to a single body.
    But I'm confused about situations like this:
    ArticulationBody+CapsuleCollider //<<CCD ok
    ^ChildArticulationBody //<< What collider? None?
    ^ChildArticullationBody+MeshCollider //<<CCD forbidden​
    So for the middle body, CCD is forbidden as it has no primitive collider? Or it's irrelevant/harmless?

    A side question: Unity totally does let me set CCD on an ArticulationBody with a mesh collider. It doesn't complain, but I guess the behaviour is undefined?