Figure: Diagnostic workflow: Physics steps and motion → Suitable CCD or casts → Test actual speeds
Figure: Diagnostic workflow: Physics steps and motion → Suitable CCD or casts → Test actual speeds

Cause and mechanism

Tunneling can occur when a fast object crosses a thin wall between physics updates. Discrete collision detection mainly tests positions at those updates, so inspect wall thickness and speed. Also check direct Transform movement and whether the selected continuous collision mode supports the bodies involved.

Check and correct the setup

  1. Inspect rigidbodies, colliders, layers/triggers, timestep, and movement APIs.
    Inspect the interval between discrete positions
    Inspect the interval between discrete positions
  2. Choose a supported CCD mode according to speed and collision partners.
    Inspect the interval between discrete positions
    Inspect the interval between discrete positions
  3. Fast projectiles may use casts between positions; avoid conflicting hit/motion processing.
    Inspect the interval between discrete positions
    Inspect the interval between discrete positions

Limits and verification

CCD is not a universal solution for every shape, rotation, or teleport. Test real speeds/directions and profile its cost.

A focused diagnostic setup

Fire a sphere at a thin box wall. As an example, 50 m/s at a 0.02 s physics step travels one meter per step, potentially spanning a thin wall.

Test in this order

  1. Check layers, colliders, trigger/contact intent and movement API.
    Inspect the interval between discrete positions
    Inspect the interval between discrete positions
  2. Compare supported CCD modes at equal speed and record contacts.
    Inspect the interval between discrete positions
    Inspect the interval between discrete positions
  3. Test rotation, oblique impacts and slow frames; coordinate casts with collision handling if used.
    Inspect the interval between discrete positions
    Inspect the interval between discrete positions

Interpret the result

Low-speed failure suggests collision setup before CCD. Transform teleporting is not ordinary physics movement. Validate actual speed/shape rather than relying on a mode name.

Related explanations

References