Physics explosions

Got an idea last night I plan to write it up in my free time but this is kinda how it goes.  You set origin,excert,and rate.  constucts a new bounding sphere at origin and exands per frame intill excert is reached.  If anything is inside the bound sphere it gets pushed back.  Sound good?  I also thought you could set a swallow mass.  If the objects mass is larger than a certain amount then the explosion swollows it up.  Also maybe a travel rate varible that a object only travels so far before it gets swolled.  Also if the explosions hits it excerts anything inside the bounding sphere that time gets thrown at the rate of the explosion.  Any more ideas? Does it sound like a useful project?  I don't know much about physics but if there are some physics to an explosion you'd like me to add tell me.  I would love to find someway to take a height map and put a hole in the ground where the explosion is any ideas on that?

hehe, you might consider looking at ExplosionManager in jME-Physics before you start writing anything. :wink:



darkfrog

As darkfrog said, take a look at the explosion effect already in. It doesn't work as the one you're planning – its "bounding sphere" doesn't swell, but instead checks one time which objects are inside it, and then pushes them back depending on how close to the centre they are.


If the objects mass is larger than a certain amount then the explosion swollows it up.


If what you mean here is to do some kind of damage testing, I think it would be more useful/logical to check the force being applied to the object, and from that determine if it should get "destroyed" (thrown out of the physics world).

I would love to find someway to take a height map and put a hole in the ground where the explosion is any ideas on that?


I don't understand what you mean here.

Maybe you could extend ExplosionManager to handle these kind of things. Help is, as always, appreciated :)

"Hole-in-the-ground" stuff would be a cool feature to add as an extension to jME-Physics.  In fact, it could probably be done very similarly to the way I dealt with RollingFriction. You could create a PhysicsUpdateAction and add the terrain to it with a coefficient for how much it should be effected and if jME supported dynamically manipulating a height-map, it technically wouldn't be that difficult.



I would be happy to write the code for it, but I don't have the experience with manipulating a terrain to do it.  If someone could give a simple example of how to do that I would be happy to take care of the physics aspects.



darkfrog

ha, I had an old version of jme-physics alrite I willl look into it again.  Thanks

the source forge cvs sucks you guys should think about getting a java one not so much demand on those servers

Yeah, it's been a problem lately and we need to figure out what to do about it.



darkfrog