Explosion Physics?

Topics: User Forum
Aug 16, 2007 at 4:15 PM
Hey,

Wondering how you may go about making an explosion have the appropriate physics.

For example, if you have a collection of other entities at a position and then you set off a bomb - how can the entities around the bomb/explosion get their proper impact?

I am thinking perhaps create a RigidBody at the bomb location and either:

1) Increase it in size and then apply some velocity ?
2) Shoot small 'explosion' particles to push everything else away

Thoughts?
Coordinator
Aug 16, 2007 at 5:36 PM
You could just calculate a force for each body by subtracting the position of the bomb from the position of the body to get the direction vector then apply some amount of force to the body that is proportional to the distance of the body from the bomb.

This will be easy to do with the new ForceController interface in the new version of Farseer.
Aug 17, 2007 at 12:27 AM
Sounds good, thanks!