I have a rigidBody with one child and this child has a collider.
I have a script that register collision on the child because it has a specific collision fonction for this collider.
BUT the collision event does not register when colliding against another rigidBody.
If I remove the parent’s rigidBody the collision register.
I dont want the collision script to be on the parent for reasons.
So is this the normal behaviour for OnCollisionEnter() ?
I have the same problem.
I’m not sure why that is, but I also find that surprising.
I added a kinematic rigidbody to the child to fix it for now. But that means I cannot overlap the colliders of the structure or there will be a constant collision occuring.
So weird, I’ve just tested it and it’s working fine on my pc… With no offense… are you sure you only have one rigidbody at your GameObject hierarchy? Child might has another and thats why it’s breaking, no sense if not.
Well I got it. Seems like it works as you expect at 2D Environment, where i was trying cause i had a 2D project opened.
But the “bug” seems to not be a bug. It works as intended, only rigidbody root is able too trigger the collision events… So you can’t fire it though the children gameObject.
But you can get the collider and the gameObject attached to using: