Today is the third time I have forgotten the use of these two collision detection, confused. Deliberately tidy up
First, list out what's involved today.
Collision Method:
Oncollisionenter (collision2d collision)
Oncollisionexit (collision2d collision)
Oncollisionstay (collision2d collision)
Ontriggerenter (collider2d collision)
Ontriggerexit (collider2d collision)
Ontriggerstay (collider2d collision)
The components involved:
Rigidbody-iskinematic
Colider-istrigger
All right, let's analyze it.
The above 6 methods of Enter Exit stay these three kinds of good understanding, the first is to enter the time to trigger, the second is to leave the time to start, the third is to stay inside the time of the trigger.
Well, that's a good understanding, so we're going to analyze things.
Oncollisionenter (collision2d collision)
Ontriggerenter (collider2d collision)
Which of these two methods is triggered in different states.
Okay, let's start the test.
About the use of unity collision detectors