Search code examples
iphoneiosgame-physicschipmunkphysics-engine

Preventing dynamic bodies from tunneling through static bodies in chipmunk?


I have a dynamic body incorrectly pass through static body so am I missing in the code ? and how can I fix this issue ?

Thanks


Solution

  • It's a time step issue. If the time step is too large, and the penetration in that time step is larger than the tolerance band, your static body will never detect the penetration by the moving body.

    Reduce your time step or increase the width of the tolerance band for penetration.