Code: Select all
Body.CollisionInformation.Events.ContactCreated += Events_ContactCreated;
void Events_ContactCreated(EntityCollidable sender, Collidable other, CollidablePairHandler pair, ContactData contact)
{
...
}
However, there is no "proper" method to determine impact force!
What I mean by "impact force" is: How much force (mass*velocity more or less) is being applied to each object at the moment of impact. In theory, they each have an equal force applied in opposite directions (more or less).
I need no more information that a scalar value indicating a strength of impact, though directions would be surely be beneficial to other use cases.
So... what's the best way to go about determining the force / other relevant data involved?
Deeper into the system, there are variables such as "accumulatedImpulse" and "relativeVelocity" that may be relevant.
My current detection code uses complicated bad-quality access to these lower-level variables as a workaround to temporarily handle the situation until a better solution is available.
As always, thanks for the amazing work!