Hello! Tell me, how can I check if a bullet hits the collider of a child through a script that hangs on a parent? By convention, I have a Player (with a script) → PlayerAnim (a child) → Head (a child with a 2D collider). Thank you in advance for your response
There are a few ways you can do this.
1). You can search up the hierarchy of the object u collided with to see if it has any parents.
(collider.transform.parent)
2). You can set up layers for the children and configure the collision matrix settings which layer can/cannot collide with other layers.
3). You can tag your objects and use CompareTag to see if you collided with the child tag