- Home /
Weird OnTriggerEnter / Exit behavior
This is something that worries me. I can't recall if on an older version this happened, but both OnTriggerEnter and OnTriggerExit works very strange.
I have an object with Character Controller (Player), so it has "isGrounded", this will be for reference.
When Player enters on a trigger (hit.tag == "Player"), while "isGrounded" and walking, OnTriggerEnter is called to infinity, and exiting the trigger doesn't call OnTriggerExit. This is weird, because when Player enter/exit the trigger while is jumping, it works flawless. Does anyone have the same problem? Is a bug? Whatever, thanks in advance :)
Answer by Meltdown · Dec 11, 2014 at 03:46 AM
Look at OnCharacterControllerColliderHit
That didn't work.
I think I forgot to say, scripts with OnTriggerEnter/Exit are on the triggers and not on Player, so OnCharacterControllerColliderHit doesn't work.