How to chose witch collider2d hits first ?

In my game every time that the player hits an especific collider the collider becomes the players parent.But some times this collider are in the same x and y axes as an other collider, and its sems that it randomly chooses witch one to collide first.How I change that ?

The solution is to register all of the colliders you hit in the OnCollisionEnter/OnTriggerEnter method, but wait until the next Update to actually assign the player’s parent.

So when collisions happen, add each collider you have collided with to a list, and if that list isn’t empty on Update, select which one you want to use, and set it as the parent, before clearing the list.

If you do not want them to be in the same x and y position, you should give them a rigid body and collider so that they separate themselves.