Hi all again,
I am trying to design an "angle of attack" routine for my game!
It's not propely an easy thing but I reached some results but just in theory.
From theory the angle of attack is the angle between the wing chord line and the relative wind (the direction of the air particles hitting the airplane - In my example, to let the thing more easy, the Angle of attack is:
The angle between the wing chord line and the airplane direction.
Take a look to the attached pic!.
There are 4 "film" about :
1)the simply flight path
this is just to let you understand the scheme logic.
2)the direction angle
This is the angle between the direction line and the horizontal line.
Calculating this angle I can know the aircraft flight direction.
3)the pitch angle
Just the pitch angle, I already find this value.
4)the difference between direction angle and pitch angle.
I have the direction of the airplane and I have the pitch angle so I could get the Angle of attack angle!..
Here I am! So peoples, do you think this theory is correct?
Have you some easy way to find the Angle of attack?
And
most important of all how I can find the direction angle? Vector?
From my attached pic you can see how I imagine this code:
EXAMPLE:
My airplane is flying in a determinate direction so
every 1 second a little cube will born from the center of the airplane.
This little cube is stopped, no velocity; now I store the XYZ position of this cube.
So, after 1 second will born another little cube and I will to store his XYZ position as the first cube.
Now I can (with your help

) make a line joining the two cubes.
So after that I should to check the direction of the flight...
I hope you can understand what I mean using my attached pic.
What do you think about all that?