Game logic lagging behind physics

What I failed to understand until now is that no frame or code update is ever executed at the time of impact. The closest two points in time are the last tick and the hit event, but the actual impact still occurred sometime between them.

The physics engine calculated the fact that a collision happened then calculated the result of the collision (the actor bounced back a bit) and updated the world to reflect that. Unreal was never in a state where the colliding actors were actually touching: no frame showed that, no code was run at that precise time.

If we need the actor location at the time of impact then we have to calculate it. A simple solution is, when the hit event fires, taking the hit location and the closest point to it on the actor’s collider. The difference of the two vectors is how much the actor’s locations needs to be offset to get roughly where is should have been at the collision. Of course this doesn’t take rotation into account so the more the actor spins the less correct this calculation will be so one might need a more elaborate solution.