OnTriggerExit2D calling twice.
Why does OnTriggerExit2D call on the first exit of the trigger and the second? In other words. Say you have a square passing threw another square. The trigExit will call when the top of the square leaves the trigger then again when the bottom of the square leaves the trigger. How can i make it not call untill the bottom side leave (aka the whole object, and not just one part of it then again when the whole object leaves) https://i.gyazo.com/56c7f65a21e6a616417774c804cc3c68.gif
Answer by sniffle63 · Mar 15, 2020 at 08:57 AM
Its because i had multiple colliders on my character, so it was being called for each collider that entered and exited.
You could add tags to the colliders, or you could just make the trigger not fire twice per parent object that enters it using a variable check in the class itself
Answer by AzurasTsar · Mar 15, 2020 at 08:45 AM
Hi, did you ever figure it out?
Its because i had multiple colliders on my character, so it was being called for each collider that entered and exited.
You could add tags to the colliders, or you could just make the trigger not fire twice per parent object that enters it using a variable check in the class itself
Your answer
Follow this Question
Related Questions
Unity crash on collision 1 Answer
ontriggerexit not working 1 Answer
ontriggerexit not working 0 Answers
OnTriggerExit not working 0 Answers