Explosion/attraction type physics

Physics APIs, Physics file formats, Maya, Max, XSI, Cinema 4D, Lightwave, Blender, thinkingParticles™ and other simulation tools, exporters and importers
neogen22
Posts: 1
Joined: Mon Jan 08, 2007 7:52 am

Explosion/attraction type physics

Post by neogen22 »

Hi,
does anyone know if it is possible to have interaction among the rigid bodies in a scene without actual collision. Think of an example, a bomb goes off and all physics enabled objects up to a certain spherical diameter are pushed away from the hypothetical point of the explosion. Or, on the other hand, an electrical magnet is set on and off at will at which time it pulls objects closer. I think I had seen a simple puzzle type example by pOOf demonstrating a magnet effect but it was just a cheat (all objects faced the point of attraction and a force was applied in Logic Bricks). What I'm taking is real interaction from a distance, like it is used in many modern games, even since UT2004.
Does such a feature exist in Bullet yet? And if so, how is it achieved?
v48h
Posts: 3
Joined: Tue Jan 09, 2007 3:07 am

Post by v48h »

Yes it is possible, here's an example that gets you what you want... you have to be kind of creative to get around some of the issues that come up. A couple of tricks I had to do to get this working was to attach an always sensor to the python script because otherwise the near sensor only activates the script once. It seems to be pretty picky about the order that you attach the sensors in... Also there is something about the raycast vehicle demo that allows you to attach actuators from one object to the controller of a different object... I'm still not sure what switch you have to flip in Blender to get that working when starting from a new file. Anyways here is the example:

http://www.geocities.com/v48h/magnet_explode.zip

I don't have a lot of web host space so if someone else wants to host this example I'd appreciate it.

Thanks
Chris
calli
Posts: 34
Joined: Tue Jul 12, 2005 1:15 pm

Post by calli »

How about adding a (invisible? or maybe with a fireball texture) sphere in the center of the explosion which is scaling up?

Make it dynamic also for the best effect.

C