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?
Explosion/attraction type physics
-
- Posts: 3
- Joined: Tue Jan 09, 2007 3:07 am
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
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
-
- Posts: 34
- Joined: Tue Jul 12, 2005 1:15 pm