Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Recall & Review
beginner
What is a Trigger in Unity physics?
A Trigger is a collider set to detect when other objects enter, stay, or exit its area without causing a physical collision response. It allows events without blocking movement.
Click to reveal answer
beginner
What happens during a Collision in Unity?
A Collision occurs when two colliders physically touch and react, causing physics responses like bouncing or stopping movement.
Click to reveal answer
beginner
How do you make a collider act as a Trigger in Unity?
You check the 'Is Trigger' box on the collider component in the Unity Editor. This disables physical collision but enables trigger events.
Click to reveal answer
intermediate
Which Unity event method is called when an object enters a Trigger?
The method OnTriggerEnter(Collider other) is called when another collider enters a trigger collider.
Click to reveal answer
intermediate
Can a Rigidbody be required for collision detection or trigger detection in Unity?
Yes, at least one of the objects involved must have a Rigidbody component for collision or trigger events to be detected.
Click to reveal answer
What is the main difference between a Trigger and a Collision in Unity?
ATrigger and Collision are the same in Unity.
BTrigger detects overlap without physical response; Collision causes physical response.
CTrigger causes physical response; Collision only detects overlap.
B. The collider's Is Trigger property is not enabled.
C. The method name is misspelled.
D. The object has no Rigidbody component.
Solution
Step 1: Check trigger setup
OnTriggerEnter only fires if the collider has Is Trigger enabled.
Step 2: Verify other conditions
Rigidbody is needed on one object but missing Rigidbody alone won't prevent OnTriggerEnter if Is Trigger is off; method name is correct; collider disabled would prevent all events.
Final Answer:
The collider's Is Trigger property is not enabled. -> Option B
Quick Check:
Is Trigger must be true for OnTriggerEnter [OK]
Hint: Enable Is Trigger to get OnTriggerEnter calls [OK]
Common Mistakes:
Forgetting to enable Is Trigger
Assuming Rigidbody absence blocks trigger
Misspelling method name
Not enabling collider component
5. You want to detect when a player enters a zone without blocking their movement, but also detect when the player physically hits a wall. How should you set up the colliders and Rigidbody components?
hard
A. Set the zone collider as trigger (Is Trigger = true), the wall collider as non-trigger, and add Rigidbody to the player.
B. Set both zone and wall colliders as triggers, add Rigidbody to the player.
C. Set the zone collider as non-trigger, wall collider as trigger, and add Rigidbody to the player.
D. Remove Rigidbody from player and set all colliders as non-trigger.
Solution
Step 1: Configure zone for overlap detection
Set the zone collider's Is Trigger to true so it detects player entering without blocking movement.
Step 2: Configure wall for physical collision
Set the wall collider as non-trigger to physically block the player.
Step 3: Rigidbody requirement
Add Rigidbody to the player so physics and trigger events work properly.
Final Answer:
Set the zone collider as trigger (Is Trigger = true), the wall collider as non-trigger, and add Rigidbody to the player. -> Option A
Quick Check:
Trigger zone + Rigidbody player + solid wall = correct setup [OK]
Hint: Trigger zone collider, solid wall collider, Rigidbody on player [OK]
Common Mistakes:
Making wall a trigger so player passes through
Not adding Rigidbody to player
Setting zone collider as non-trigger blocking player