I'm trying to make a game where the player shoots at objects, and when the 'bullet' hits the objects should disappear. Right this works fine, but now I'm trying to make it so the objects only disappear if the bullet gives a certain amount of force / impulse. Anyone know how to do this?
Currently, to get the collisions I'm doing:
collision_handler = space.add_collision_handler(1, 2)
collision_handler.begin = collision_happened
You should use a post_solve callback. In that callback you can check if arbiter.total_impulse is bigger than some value. Depending on your logic you might also want to check that arbiter.is_first_contact is true.