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
- Inspect rigidbodies, colliders, layers/triggers, timestep, and movement APIs.
Inspect the interval between discrete positions - Choose a supported CCD mode according to speed and collision partners.
Inspect the interval between discrete positions - Fast projectiles may use casts between positions; avoid conflicting hit/motion processing.
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
- Check layers, colliders, trigger/contact intent and movement API.
Inspect the interval between discrete positions - Compare supported CCD modes at equal speed and record contacts.
Inspect the interval between discrete positions - Test rotation, oblique impacts and slow frames; coordinate casts with collision handling if used.
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.