0
0
Unityframework~5 mins

OnCollisionEnter2D and OnTriggerEnter2D in Unity - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is OnCollisionEnter2D used for in Unity?

OnCollisionEnter2D is a method called when two 2D physics objects with colliders and rigidbodies physically collide. It detects solid collisions.

Click to reveal answer
beginner
How does OnTriggerEnter2D differ from OnCollisionEnter2D?

OnTriggerEnter2D is called when a collider marked as a trigger overlaps another collider. It detects overlaps without physical collision response.

Click to reveal answer
intermediate
What must be true about colliders for OnTriggerEnter2D to be called?

At least one collider must have Is Trigger enabled, and at least one object must have a Rigidbody2D.

Click to reveal answer
intermediate
What parameters does OnCollisionEnter2D receive and what info can you get from it?

It receives a Collision2D object, which contains info like the other collider, contact points, and relative velocity.

Click to reveal answer
beginner
Why would you use OnTriggerEnter2D instead of OnCollisionEnter2D?

Use OnTriggerEnter2D to detect when objects overlap without blocking movement, like picking up items or entering zones.

Click to reveal answer
Which method is called when two solid 2D objects collide physically?
AOnCollisionEnter2D
BOnTriggerEnter2D
COnOverlapEnter2D
DOnContactEnter2D
What must be enabled on a collider to use OnTriggerEnter2D?
AIs Solid
BIs Trigger
CIs Kinematic
DIs Static
Which component is required on at least one object for collision or trigger events to work?
ARigidbody2D
BBoxCollider2D
CSpriteRenderer
DAnimator
What kind of information does the Collision2D parameter provide in OnCollisionEnter2D?
AThe trigger zone size
BOnly the other object's name
CContact points and relative velocity
DThe object's health
When would you prefer OnTriggerEnter2D over OnCollisionEnter2D?
ATo change physics materials
BTo detect physical impacts only
CTo animate sprites
DTo detect overlaps without blocking movement
Explain the difference between OnCollisionEnter2D and OnTriggerEnter2D in Unity.
Think about solid hits versus passing through areas.
You got /4 concepts.
    Describe a simple use case for OnTriggerEnter2D in a 2D game.
    Imagine a player walking into a special area or collecting coins.
    You got /4 concepts.