olivehehe_03
Joined: 05 Nov 2008 Posts: 1
|
Posted: Wed Nov 05, 2008 2:08 am Post subject: Get force of a collision |
|
|
Not sure how active these forums are, but I'll ask anyway. I'm making a physics based game (google Armadillo Run for a basic idea) and I'm trying to make it so if 2 bodies collide with enough force one object and any attached joints will break.
Checking through the documentation has found newton::IMaterialPair in ContactBegin and ContactEnd, which are part of newton::IMaterialCollisionCallback, which gives me a getContactForce() fucntion but according to the docs:
| Code: | | The contact force value is only valid when calculating resting contacts. This means if two bodies collide with non zero relative velocity, the reaction force will be an impulse, which is not a reaction force, this will return zero vector. this function will only return meaningful values when the colliding bodies are at rest. |
This has me a bit concerned because I know in most cases neither object will be completely at rest. Is there a better way to get the amount of force on a particular object at the time of collision? I can get both objects fine, they're just the other 2 values that ContactBegin gives me and I've got a fair idea on how to destroy whichever object I like but I just need to see if the force of collision is high enough for either to break. Thanks in advance |
|