Search Issue Tracker

By Design



Found in


Issue ID




OnCollisionExit is delayed by a frame



Steps to reproduce:
1. Open user attached project OnCollisionExitBug
2. Open "demo" scene
3. Hold the right arrow key until the circle hits the collider
4. Hold the left arrow key until the circle leaves the collider

Expected result: Only one frame should take to activate OnCollisionExit after leaving the Quad
Actual result: It takes two frames to activate OnCollisionExit after leaving the Quad

Reproduced in: 2017.1.0b2, 5.6.0p2, 5.5.3p2, 5.4.5f1

  1. Response avatar

    Resolution Note:

    This is how Box2D works. It finds contacts first then performs a simulation. The new positions may produce overlaps/contacts but they won't be found until the next simulation step.

Comments (1)

  1. Ba221e490c1c6a0ea78de0ea56d50d3b?d=mm


    Sep 21, 2018 08:47

    It is not only callbacks such as OnCollisionExit which are delayed by a frame, but also the results returned by methods Collider2D.IsTouching, Collider2D.GetContacts.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.