[ODE] Explosions
Sean S Cullen
Sean at blackscreen.org
Sun Jul 11 07:51:11 MST 2004
I model explosions in a slightly different way that you may find easier. I
just insert a sphere object to the collision detection engine for a single
tick. I make the CFM of the material type be about 3.0 and the results are
an extremely squishy force being applied to any intersecting physical
objects. The radius of the blast is adjusted by the radius of the sphere
and the force of the blast is adjusted with the CFM. I've been using this
for grenade explosions and it seems to work well. The exception is an
explosion near a wall will push tables/chairs around on the far side of the
wall.
Sean
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of GARY
VANSICKLE
Sent: Friday, July 09, 2004 9:06 PM
To: ode at q12.org
Subject: RE: [ODE] Explosions
> Hi,
>
> I need some help implementing explosions in my game.
> I've tried searching the archives, but most threads seem to
> be about unwanted explosions :)
>
> An example: Say I have a big cube composed of smaller cubes
> (5 x 5 x 5 matrix) in my scene. I want the cube in the bottom
> center to explode and create a shockwave that hurls the other
> cubes outwards. Any easy ways to achieve this? I also want
> the shockwave to have an outer limit/radius. That is,
> cubes/objects which are outside the blast radius shouldn't be
> affected (unless of course they are hit by other cubes).
>
>
> Thanks in advance!
For this particular case, probably the best way to do this would be to apply
a face-centered impulse to each cube adjacent to the exploding one. ODE
doesn't support impulses directly (my patch was rejected ;-( ), so you'll
have to apply a force during one step that's equal to:
Force = Impulse/DeltaT
Now, how you figure out what the value of Impulse should be is probably best
left to trial and error, unless you know a way to calculate it from whatever
the explosive is.
This method inherently eliminates any issues with limiting the blast radius;
the shockwave will only propagate via object collisions.
--
Gary R. Van Sickle
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list