Original Post
I am working on a basic aircraft simulation but have hit a problem. I can calculate the forces on the plane at a time (lift, weight, thrust, drag) which when added together give me an acceleration vector of the plane. Now what's the best way to use that acceleration vector to compute a velocity? I started using an accumulated vector for the velocity but that isn't working out very well. Basically every frame I was calculating the acceleration, adding to velocity vector and then adding the velocity to the position.
vector3 acceleration = CalculateAccelVector();
velocity += acceleration;
position += velocity;This was causing a few issues. For example if the aircraft was moving along the z-axis and made a quick turn to the x-axis, it would maintain its velocity along the z-axis because there was no force to cancel it out. I've tried dividing the velocity vector every frame by some amount so that eventually the extra force would be cancelled out and fudging the velocity direction toward the thrust direction but haven't found good values for this yet. The aircraft would either act like a very powerful rocket with no drag (not losing any speed in turns) or the heading would take too long to match the thrust direction (flying forward and sideways). I think I am missing something simple here but don't know what, any ideas? Not sure if it matters but the flight model I am trying to implement is not a full blown simulator. Much simpler inputs to the physics simulation. Thanks