- Home /
Directional Explosion
Hi, I'm looking for a way to do a directional explosion. This should look like heavy wind which pushes rigidbodies away. It could also be called negative magnet, would be the same effect I'm looking for. Is there already a way to do this? If yes, how? I saw that there is Rigidbody.AddForce and Rigidbody.AddExplosionForce (which is not one-directional). So I'll need AddForce but how do I send this to all rigidbodies in my field of view?
Answer by Ashkan_gc · May 21, 2013 at 06:06 AM
search for vector fields on google. you should have a function that given the position and direction of explosion, returns a force value for all objects in range and 0 for others and then you can apply the force returned for each object.
This will help alot (read all 3 parts) its part 3 with links to 1 and 2