Problem with contact listener and touching bodies

hello,

i use a b2ContactListener to check if a ball (player controlled) is touching boxes.

if the ball touches the boxes and the player hits fire, the ball gets a impulse applied away from the box.

if the ball does not touch the boxes and hits it with a certain force, the box should vanish.

now the problem is, that if the ball touches the boxes and player hits fire, i get a last b2ContactListener::Persist() event showing a big impact force, i assume about the force that is added to the ball.

there is no difference in force directions between a ball hitting the box and a ball touching the box and getting a impulse away from the box, so i have found no way to detect which situation it is.

i assume, the problem comes from the fact, that box2d first handles the box, applies (none) forces and checks for collision, which is still the ball and then somehow deciding from the balls forces, that its a impact, which is actually wrong.

is this a bug? or how can i change my code to prevent this?

Original thread: https://box2d.org/forum/viewtopic.php?t=3668