How do you achieve realtime destruction the the game engine? For instance, if I have a car which has a damaged door, how would I make the door fling on its hinges depending on the velocity of the car. Here is a link to show the effect I am trying to achieve: https://www.youtube.com/watch?v=FtUhOdROmlo&list=PL8152A2F53ADC5F49
Use rays or collision detection for detect if the car is colliding, for get the velocity use the getLinearVelocity() with python, and finally for the deformation use shapekeys and use the velocity for the value of the shapekeys.
PD: I have no time in this moment for make a example, sorry.
PD2: this python function can also be useful
In that video, each car part was made as a separate object with a collision sensor that triggers shapekey action when a collision is detected. If you’re trying to get a more advanced looking effect then you can do what Carlo697 said, by getting the difference between the velocities of the collider and collided objects on collision.
I tried before to create actual “metallic looking” softbody deformation but my only issue was that the deformation springed back, and wasn’t permanent. (tried several “hacks” like creating constraints on the fly that holdup verts in places but it got bugged out allot.)