Who calls OnCollisionExit?

Hi everyone,

I’m working with motion controllers and I want to develop the Rubber Band Method for my thesis to backtrack my hand (not crossing) when colliding with walls.

I have a Sphere collidere for each finger and the rigidbody on the root gameobject. At first I developed a script for each collider but it wont be called because the rigidbody is on the root transform.
After a while I tried to use a single script while saving all the ID of the colliders and for the OnCollisionEnter and OnCollisionStay I can understand which collider called the event (because I check the istanceID from the colliders of the contact point) BUT with che OnCollisionExit I do not have any contact point, so I cannot understand which of my colliders called the OnCollisionExit.

any help will be appreciated.

OnCollisionExit provides the same information as OnCollisionEnter does. I just checked with code I wrote a while ago that checks contactpoints in OnCollisionExit and it worked.

from this answer it seems like that there is no chance to get those contact points.

@hexagonius : If your old script is from unity 4.6 then you are right. It seems like that from unity 5 the OnCollisionExit does not return any contact point.

i just posted an answer to all your guys’ problems on the link @iferoporefi shared, even tho im 3 years late.