COLLISION • TRIGGERS

Unity Collider Not Detecting Collisions or Triggers

Diagnose and fix OnCollisionEnter or OnTriggerEnter callbacks failing to execute between game objects.

The 3 Golden Collision Rules

  1. At least ONE object MUST have a Rigidbody: If two static colliders touch without any Rigidbody attached to either object, Unity PhysX will NEVER invoke collision callbacks.
  2. Trigger Boolean Check: If Is Trigger is checked on either collider, you MUST implement OnTriggerEnter(Collider other), NOT OnCollisionEnter(Collision col).
  3. Layer Collision Matrix: Open Project Settings → Physics and verify that the intersection checkbox between both object layers is checked.
1

Verified Trigger Detection Template

TriggerCheckpoint.cs (C#)
using UnityEngine;

public class TriggerCheckpoint : MonoBehaviour
{
    private void OnTriggerEnter(Collider other)
    {
        // Debug log to test if trigger event fires
        Debug.Log($"Trigger entered by: {other.gameObject.name} (Layer: {LayerMask.LayerToName(other.gameObject.layer)})");

        if (other.CompareTag("Player"))
        {
            Debug.Log("<color=green>[Checkpoint Reached!]</color>");
        }
    }
}

Learn More

Mastering the PhysX Collision and Trigger Detection Matrix

Unity's PhysX collision engine adheres to strict mathematical criteria before invoking collision callbacks. If any of the following mandatory conditions are violated, Unity will silently drop the collision event without outputting any warnings in the console:

The Collision Matrix Requirements

Object A Object B OnCollisionEnter? OnTriggerEnter?
Static Collider Static Collider NO NO
Rigidbody + Collider Static Collider YES NO (unless IsTrigger)
Rigidbody + Trigger Static Collider NO YES
Kinematic Rigidbody Static Collider NO NO

Preventing Fast Projectile Tunneling (Discrete vs Continuous)

When high-velocity projectiles (like fighter jet missiles or sniper bullets) move faster than their collider thickness in a single fixed simulation tick (e.g. traveling 50 meters in 0.02s), they will pass completely through thin walls. This is known as Tunneling. Fix this by setting the Rigidbody's Collision Detection mode to Continuous Dynamic or Continuous Speculative.

Troubleshooting Layer Collision Matrix Check

Always navigate to Edit → Project Settings → Physics. Scroll down to the bottom matrix grid. Ensure the checkbox intersection between your attacking entity's layer (e.g. PlayerBullet) and target entity (e.g. EnemyAircraft) is marked active. If unchecked, Unity PhysX completely skips physics intersection tests at the driver level.

PhysX Performance Tip: When moving static colliders without a Rigidbody, Unity rebuilds the PhysX spatial partitioning tree, which severely degrades mobile performance. Always add a kinematic Rigidbody to moving obstacles or trigger zones to ensure fluid 60 FPS gameplay.