Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved Get collider from compound at root entity?

Discussion in 'Physics for ECS' started by Bas-Smit, Sep 12, 2023.

  1. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    274
    I have a compound collider and I would like to obtain the collider that represents the physics shape attached to the root entity, can anyone enlighten me?

    Root Entity
    | - body
    | - shape <= looking for this one
    - Child Entity
    - shape
     
  2. Bas-Smit

    Bas-Smit

    Joined:
    Dec 23, 2012
    Posts:
    274
    collider->GetLeaf(new ColliderKey(1, 0), out var c))