collision.gameObject returning parent.

I have a gameobject with a rigidbody but no collider. I have another object childed to the first with a collider but no rigidbody. When a moving object collides with the collider of the child object, in it’s OnCollisionEnter collision.gameObject returns the parent, not the child like it’s supposed to (Unity - Scripting API: Collision).

Solved by using collision.collider.gameObject instead of collision.gameObject.