How to estimate collision power?

Discuss new features and future development.
Post Reply
garek
Posts: 1
Joined: Sun May 22, 2016 6:00 am
Contact:

How to estimate collision power?

Post by garek »

I need to estimate the power of a collision to decide the future of the colliding objects: should they explode, or just "bounce" and stay alive.

The exact case:
Box is falling on the ground (static body; segment shape). If it falls "hard" it should explode and disappear from the world, if it falls "soft" then it should stay as is.

I guess one should use totalKE in post solve callback to make the decision. But the problem is that i do not know how to "normalize" the total kinetic energy (because i do not know its possible min and max values).

I would appreciate if somebody could point in the right direction!

Thank you.
User avatar
slembcke
Site Admin
Posts: 4166
Joined: Tue Aug 14, 2007 7:13 pm
Contact:

Re: How to estimate collision power?

Post by slembcke »

You can't normalize it since it's range is 0 to infinity. Honestly the best way to handle it is to guess and check. Log the KE or impulse, decide what is a good number and use that. Adjust from there to get the right feel.

The "correct" way to do it would be to do material and structural analysis on the object that would break so you know how much force it could take in different places and directions. If you want to go to that level of detail for a game, then kudos for the dedication, but it probably won't add anything to the game experience. ;)
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests