Search Unity

Bug Wrong entities obtained via GetChild

Discussion in 'Physics for ECS' started by Foreverplane_, Mar 12, 2023.

  1. Foreverplane_

    Foreverplane_

    Joined:
    Nov 11, 2018
    Posts:
    11
    Iterate through Physics Collider KeyEntityPair trying to get child collider through Collider->GetChild by key from Physics Collider KeyEntityPair.
    However, for this key, a completely different entity is returned that is not related to the child of the main one at all.
    For example:

    I have a pair Entity(392:2) ColliderKey (3221225471)
    But when I try to get a child collider by ColliderKey (3221225471)key, I have Entity(135:1).

    Does anyone know how to get the correct collider key entity?

    upload_2023-3-12_17-21-47.png