Wind and turbulence

May 7, 2010 at 7:09 PM
Edited May 7, 2010 at 9:19 PM

Hi!

I'm making a game set in, well heaven. In the game you build land that supports different buildings. The terrain blocks will either be supported by ropes or just a slider joint. I need the blocks just to hover in the wind (they are witched). And I thought that if they just stand still it will just look rather boring, so I thought of making turbulence but how I don't know?

Also I need several hang bridges so is it possible to have gravity on some objects and some whitout?

Questions:

1. How to make bodies react to wind?

2. How to make bodies bob in the air?

3. How to make bodies with gravity or not?

May 8, 2010 at 12:58 AM
Edited May 8, 2010 at 12:59 AM
A Controller sounds like a good idea for you -- basically, you'll need to work out some external forces to apply to certain objects each timestep.

For the gravityless objects, at least in FP3 you can just set IgnoreGravity. If you can't do that in FP2, you'll need to create your world with no gravity, and each timestep go through all the bodies and apply the force of gravity manually to those objects that should respond to gravity.

For wind, pick a direction for the wind and each timestep apply force in that direction (plus some randomness). Maybe don't always add the force to the exact centre of the object, either -- so it will rotate a bit.

For making objects bob in the air, I'd create an invisible spring above them (and maybe another spring pulling them towards the position they're supposed to be at). Add wind like I described above to get them to move around.

HTH Jeremy