I went through some similar topics, didn’t find a helpful answer, I’m probably not experienced enough. Here’s my issue…
I have a rather simple setup, a ground and a GameObject that touches the ground, rotates along an axis close to the base and at some point touches the ground. I want to detect when the top of my object touches the ground.
I’ve used a simple Cube as my rotating object, and used 2 colliders. A capsule collider at the bottom of my object, that makes sure my object stands on the ground and can rotate although it’s a cube, and a small box collider at the top that I need to check when it collides with the ground. I actually want it to collide with my ground, so I cannot make the second collider a trigger.
I tried attaching the capsule collider to an empty gameobject and making it a child of my cube, but OnCollisionEnter keeps detecting every collision with all colliders.
The strange thing is that I first tried the same thing in 2D and it worked. I attached my BoxCollider2D and my script to my cube and a circle Collider to an empty child GameObject and OnColliderEnter2D detected only the BoxCollider2D collision…