"health" how to trace damages?

Hello.
I is not very know programming and architecture of Box2d.

Variable "m_health" - b2Body.m_userData.m_health:int

How to trace the damage into collisions and reduce health?
You can examine the m_contactList of a b2Body at regular intervals. If it's empty then all is well, if it contains anything you have a collision and can start reducing health.
You can also use that contact list to figure out how strong each contact is. A good approach is to not count contacts that are under a certain threshold.
From contactList we can find out what bodies collide with each other, but how to find out with what force?
Somebody can give an example?
Look at the contact processing test. You can use the normal impulse on the contact points to measure the strength of the collision.
Where to take contact processing test?
Box2D\Examples\TestBed\Tests\CollisionProcessing.h
And how to calculate force of contact?
Look at the contact processing test. You can use the normal impulse on the contact points to measure the strength of the collision.

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