Skip to main content
1 of 2
user55564
  • 603
  • 5
  • 6

Assuming you are not going for a full out physics simulator:

Your plane needs to have a position, velocity, direction(angle), acceleration and various maximum values. On each game step:

velocity += acceleration * dt;
velocity = clamp(velocity, 0, max_velocity);
acceleration = 0;
position += velocity * dt;

On (de)acceleration:

acceleration = getVecFromMagnitudeAndDirection(accelerationRate, direction);

On moving north/s/e/w:

direction += (desired_direction - direction)*rotationRate;
  • note that you probably want a calcAngleDifference function to handle various edge cases.
user55564
  • 603
  • 5
  • 6