Sign in to follow this  

what formula ?

Recommended Posts

Not sure what you mean by this, exactly. But I'm assuming the effect you are looking for would be gained by doing something like

- generate a bunch of particles and position them at the center of the explosion.
- give each particle a velocity which can be up to X% different from a base velocity from a velocity you yourself choose. X should be a relatively large number - you want a wide range of random velocities for this to look realistic at all.
- for each particle determine a random direction (could do this by creating a vector with random values and then normalizing the vector.) Then assign the particle the initial movement vector of this direction with the velocity you just found in the previous step.

After that you'll have the particles start moving along the motion vectors you assigned them. If you are in a gravity based environment you will apply gravity to the particles each frame by incrementing the z-component of their motion. And then maybe you'll add code so that the particles bounce off the ground or do whatever it is they need to go.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this