Collision Detection not working correctly

Hi everyone,

I’m simulating a bin-picking application in unity, and I have added some triggers near my sucking tool, in order to detect the pieces in contact with them and attach them to the tool. However, in many cases I can visually see that the trigger is colliding with the mesh collider of the piece but the OnTriggerEnter/OnTriggerStay signals are not being called, when I move a little bit around for some configurations they are called.

Here an image of the trigger and collider colliding without any detection:
9414335--1318730--upload_2023-10-17_15-47-38.png
9414335--1318733--upload_2023-10-17_15-47-53.png

The yellow object inside the red circle are the box triggers that represent the magnet, and the purple body is the piece to grasp which is composed of two convex mesh colliders.

Any idea about how to solve this problem? Are there any physics parameters I should modify?

Best regards

If the purple object is a rigidbody then it’s possible that it has gone to sleep. You can make it stay awake with WakeUp.

Thanks, I didn’t know about rigidbody sleeping thank you very much.
I reduced the sleep threshold in the project settings to zero, so now rigidbodies do not go to sleep. However, now all pieces have a small jittering and I have a weird behaviour since the piece is entering the trigger and exiting in the next physics update, but visually it is always in collision with the trigger.

Is there any workaround I can do, to still make a trigger detect a sleeping rigidbody? or at least maintain the sleeping behavour until the trigger collides with it?

The only thing that will wake a rigibody is another rigidbody.

Or could you make your active picker a rigidbody and the stationary passive object a trigger?. This would be closer to how God intended it to be.

Or even better, make them both be rigidbodies?.