2 Colliders separate detection with OnColliderEnter

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…

I don’t know if my setup is clear, I temporarily (??) solved my problem by adding 2 more colliders on the ground, one on the right of my object and one on the left, they get triggered only when my object touches the ground, parented them in an empty GameObject and made them triggers.

Now it works like I want, but somehow it doesn’t seem like the “right” way. I don’t know if there is any other more efficient way to achieve the same result.