Having a problem getting the collision strength as its always zero. Doesn't matter if a body his a static object or another dynamic body. This is the code for trying to get the strength:
Code:
void Physics::BeginContact(b2Contact *contact)
{
b2Manifold *manifold = contact->GetManifold();
float strength = 0;
for (int i=0; i<manifold->m_pointCount; ++i)
strength = manifold->m_points[i].m_normalImpulse;
strength = strength/manifold->m_pointCount;
}
Am I doing something wrong? Or has there been no strength calculated yet? If it hasn't been calculated yet where am I supposed to get the info?