Recent content by jastanton

  1. J

    How can I incorporate wind into a basic projectile simulation?

    Feel free to test out my code: this includes draw, and collision Obviously some user interface glitches that I'm not concerned right now. the wind indicator in top middle shows the direction and power of the wind (from 0 being low to 23 being highest) the user is stuck at power 20 for the...
  2. J

    How can I incorporate wind into a basic projectile simulation?

    Also to edit your code I took out the time squared, it was giving it weird results: projectile.x += 0.5f * projectile.velocityX * timestep;
  3. J

    How can I incorporate wind into a basic projectile simulation?

    James Leighe that really helped me out! However I think there are a few mistakes in your math for example: projectile.x += 0.5f * projectile.velocityX * timestep * timestep; projectile.y += 0.5f * projectile.velocityY * timestep * timestep; should be projectile.x += 0.5f *...
  4. J

    How can I incorporate wind into a basic projectile simulation?

    Hey I am making a game with basic a projectile that includes gravity and wind and I don't know how I can control the wind direction and power. Here is what I've got without wind: Setup: x = 0 /// x starting position y = 0 /// y starting position r = 10 /// radius of projectile time = 0...
Back
Top