Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am developing a mobile game for Android. It is a 3D jumping game (like ski jump) where wind plays a important role so i need to simulate it. How could I achieve this?

The game uses libgdx for rendering and a port of Bullet physics engine for physics. To simulate the jump I have 2 spheres which are placed at the start and at the end of the player and gravity is applied to them (they role down the hill and jump at the end). I use them to calculate the angle and the position of the player. If a button is pressed some extra y speed is applied to them (to simulate the jump before the end of the jumping ramp).

But now I have to add wind to it. How is this usually done? Which collision box/method should I use? The way I understand it I only have to apply some force with direction to the player while in mid air. How can I do this in Bullet?

share|improve this question
up vote 4 down vote accepted

How is this usually done?

There is no usual way of simulating wind. It depends on your situation. First you have to decide how the wind interacts with the player, how is it seen by the player etc, and then you think of a way of implementing it.

For example, say we want the wind to randomly appear as dust/snow/leaves particles and it simply pushes the player a bit in that direction. That's easy to implement; This wind object will pop up some place, with its own visuals, and when the player enters its volume a force acts upon the player.

For something more complicated, like a glider simulator that needs to know how the wind flows around mountains, hills and valleys, you would need a much more complex simulator.. but even in this situation we are far from a fluid simulation!

share|improve this answer
i have to simulate a jump of a ramp and gliding would be a nice touch to the game. Do you happen to know how this is done in a physics engine or in general? – jernej Jan 15 '12 at 14:52
I don't know.. do a little research on flight simulators and how they deal with aerodynamics. – Diego Jan 25 '12 at 10:05

If all you need is an adjustment to an object in flight, a quick and dirty solution would be to just add some gravity on the X axis to pull your man to the left or right.

share|improve this answer
It's called a force or an acceleration, not gravity. But you are correct. Although this answer was already covered: "... when the player enters its volume a force acts upon the player." – Byte56 Jul 3 '12 at 23:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.