of     1   

magnalite
#111350517Wednesday, August 28, 2013 2:27 PM GMT

I'm attempting to make a plane with real aerodynamics and I'm wondering how to figure how to do the angle of attack to modify the lift. Would just taking the y component of the lookVector work fine? Or would that be really inaccurate?
noobertuber
#111387357Wednesday, August 28, 2013 10:20 PM GMT

The angle of attack is given by the following: math.asin(lookvector.y). As for whether merely using the unmodified y component would work, it depends on your implementation. -God Bless-
noobertuber
#111387699Wednesday, August 28, 2013 10:23 PM GMT

After a bit more examination, you don't need the angle, on the y component. You can probably make a table akin to the Wikipedia Angle of attack lift curve, except that the independent variable should be the y component rather than the angle. As the angle is unique to the y component, it will save you a step of computation. -God Bless-
DoctorEvo
#111432871Thursday, August 29, 2013 6:48 AM GMT

Remember, angle of attack isn't between the nose and the ground, it's between the nose and the oncoming airflow. Thus, you HAVE to consider velocity to find angle of attack. I used a series of cross products and dot products with my airplanes, as well as a sin(x) ~ x approximation (so I guess technically speaking you could say I found "ratio of attack" or "slope of attack" instead of angle of attack, but really it's of little consequence when it comes to sub-stall flight characteristics). And also don't forget, once you DO find angle-of-attack and then the magnitude of your lift vector, you're going to need to use velocity AGAIN to properly orient that vector (since lift is, by definition, orthogonal to air velocity). I managed again to simplify it and combine it all into one compact vector operation, but that really defies explanation without some method of 3d illustration. -DoctorEvo
Aerideyn
#111437275Thursday, August 29, 2013 9:45 AM GMT

I went through the basics theory of simulating aerodynamics a while ago here, http://www.roblox.com/Forum/ShowPost.aspx?PostID=55970057 If you want me to dig up my code then let me know :)
Alyte
#111446326Thursday, August 29, 2013 1:58 PM GMT

noobertuber!!
DoctorEvo
#111456482Thursday, August 29, 2013 5:03 PM GMT

I don't know why I didn't think of this before... but another possible option is to forget about lookVector and just translate the velocity vector to object space (using vectorToObjectSpace(velocity)) and then use the components.

    of     1