OnTriggerEnter and Exit activate at the same time when moving on a platform.
i have a simple OnTriggerEnter2D and exit but they activate at the same time
void OnTriggerEnter2D(Collider2D coll)
{
if(coll.gameObject.tag=="FloorPlatform")
{
MoveDown=false;
Debug.Log("EnterDown");
}
}
void OnTriggerExit2D(Collider2D coll)
{
if(coll.gameObject.tag=="FloorPlatform")
{
MoveDown=true;
Debug.Log("ExitDown");
}
}
when i am moving in the platform, in Console all i get is>> ExitDown EnterDown ExitDown ....
Comment
Your answer
Follow this Question
Related Questions
Trigger animation transition not working 0 Answers
how do i trigger state machine ? 2 Answers
Infinte runner ground loading on trigger not working 1 Answer
OnTriggerEnter2D not working 1 Answer
Unity2D I wanna use a delay time on Entering an Trigger. 0 Answers