Calculate Impact Force

I need to calculate impact force manually, based on velocity vectors of two objects at hit moment, but I’m not very good with vector math.

Obviously I can’t just use speed of objects, because it could be a glancing hit, or a head-on hit.

How do I do this?

Thanks.

If you think way back to your school days, you’ll remember that Force = Mass x Acceleration (F = MA)

So you need to get the Mass of your object and multiply it by it’s Velocity.

As for a glancing hit vs a dead on hit, you can get the Center of Mass from your Actor (which is just a 3D point) and compare that against where your object was hit (usually you simply scale the force linearly based on how far it is from your center of mass).

Or just use the Apply Force at Location node which should do all that for you. :slight_smile:

1 Like

There’s actually a bit more to it, with kinetic energy, but yes, I did this math. The thing there is to get the right values, because I’m not sure which values it’s using, I mean - m\s or whatever else.

For now I actually get kinetic energy of both objects, as well as their velocity vectors, and sum those vectors and multiply by kinetic energy. Not sure how close this is to real math, but tests showed pretty good results. If one objects hits another static object - the force is lower compared to two objects colliding dead on into each other, and so on. But damage values were huge, so I had to divide them a few times by enormous numbers like 100000000 :smiley:

Apply Force at Location is not what I’m looking for. I need to calculate impact force to get collision damage. And it would be very very easy with any physics object - the Hit actually has “Impact Force” output, which does exactly what I need. BUT it always returns 0 for characters, since apparently Movement Component is used to move them at that point.

Hi!
You can get the Velocity XY from the Movement Component of the character. Then get the Length to know the speed.

To apply force to a character there is the Launch Character node that does pretty much the same thing.

Hope that helps! :slight_smile: