"Crushing" of compound objects

Discuss new features and future development.
Post Reply
ChAdams
Posts: 23
Joined: Thu Apr 26, 2012 2:34 pm
Contact:

"Crushing" of compound objects

Post by ChAdams »

In my game I have multiple shapes grouped into the same body. These shapes have different hitpoints, currently when there's a collision involving compound objects, the shape which collides takes all the impact, and the group object bounces.

I've got it set up to distribute damage across adjacent shapes in a group with diminishing value, however I have a better idea that isn't so obvious to implement.

When there's a collision, i'd like to calculate the maximum inertia before a shape would be destroyed/removed based on same arbitrary equation of force->hp loss and current hp, if the collision produces an inertia greater or equal to that maximum, then destroy the shape and limit the inertia to be used to apply force to that maximum. If I've thought correctly, then as my objects collide they shouldn't bounce back until enough shapes have been destroyed to total enough inertia to cause a directional change.

And my question is if there's an easy way to implement this without modifying chipmunk, and if I need to make modifications what the best approach would be.

Cheers!
rrakkola
Posts: 9
Joined: Thu Jun 27, 2013 3:04 pm
Contact:

Re: "Crushing" of compound objects

Post by rrakkola »

Here's one topic on detecting "crushing" if it helps any...

http://chipmunk-physics.net/forum/viewt ... 660#p13660
Post Reply

Who is online

Users browsing this forum: Heise IT-Markt [Crawler] and 6 guests