Unity : How to handle compound colliders 2D physics collision detection
I´m making a small game where the basic game mechanic is dragging things around the level . My Player G.O. is the one who drags the other objects around the level . This G.O. (the player GO) has a rigidBody2D component , and in order to drag other objects , I turn the dragged object into a child of the player , so that I only move the player through the rigidBody component and the dragged object moves along the player object .
The problem is that whenever a something that should kill the player by contact makes contact with the object that is being dragged , the death of the player still triggers even though the player has not make contact with the hazardous object to begin with . This is obviously not the intended result , if something that is meant to kill the player makes contact with the dragged object but not the player , the player should not be killed . How can I fix this?
EDIT : By killing I mean destroying the player GO.