I’m using a kinematic rigidbody, OnTriggerEnter is always fired, but OnTriggerExit is never fired.
As of what I’ve seen on the forums, the solution my lie by detecting the OnCollisionExit on the child GameObjects, but for most of what i’ve tested, both with and without childs, it never triggers.
Should I set the Kinematic of the rigidbody to false, and activate all constraints, as some other forum posts suggested ?
It seems to be just bugged for now.
You’re not destroying the object while its inside the collider?
From experience, that’s the only time the on exit funcs don’t fire, although I havnt used the event for a long time.
No i’m not. A friend of mine tried too, it didn’t worked for him too. I didn’t gave him my code to test the collsions to see if it was just my code, and it’s just not triggering. Maybe the unity crew made a mistake.
I would have to go away and prove it… I would be surprised if they broke it, but stranger things have happened
Show us your code JIC theres something obvious perhaps
Well, it’s just a plain OnTriggerEnter and a OnTriggerExit, nothing special about it.
void OnTriggerEnter(Collider collision)
{
Debug.Log("Collider entered : " + collision.gameObject.name);
}
void onTriggerExit(Collider collision)
{
Debug.Log("Collider exited : " + collision.gameObject.name);
}
Always logs a “Collider Entered”, but never logs a “Collider exited”. And it has MonoBehaviour.
you have a lowercase o on onTriggerExit
that wont work. Must be correct casing. Not sure if this is just a typo you just made
Problem fixed. Thank you ![]()