Comments and answers for "2D angle of two Vec3"
http://answers.unity.com/questions/870197/2d-angle-of-two-vec3.html
The latest comments and answers for the question "2D angle of two Vec3"Comment by Glurth
http://answers.unity.com/comments/871138/view.html
There is a "thumbs up" button for comments. You might need more "Karma" to use it though- not sure how that stuff works myself.Wed, 07 Jan 2015 18:07:41 GMTGlurthComment by gamedevpadawan
http://answers.unity.com/comments/871118/view.html
Thank you all.
Should be some '+' or 'Thanks' button in comments.Wed, 07 Jan 2015 17:41:12 GMTgamedevpadawanComment by Glurth
http://answers.unity.com/comments/871006/view.html
I like the other comments, but let me try to explain a different way. The airstream vector you are looking for can be described as “the component of the velocity vector that is pointing forward”. Much like you would say the Y of the velocity vector can be described as “the component of the velocity vector that is pointing up.”
Obviously you won’t be able to just extract a single coordinate here, instead you will want to use a dot product of your velocity vector and your forward vector. This will tell you how fast you are moving in the forward direction. The dot product computation INCLUDES the angle you are looking for and is defined as |VectorSpeed| Cos(theta), where theta is the angle between the two vectors. Multiple this scalar (a non-vector) result with your VectorForward to get the final vector your looking for. You can also use this formula and the dot product result to determine the angle theta.
This picture in the wiki for dot product has a great picture that describes this exactly.
http://en.wikipedia.org/wiki/Dot_product#mediaviewer/File:Dot_Product.svgWed, 07 Jan 2015 15:31:41 GMTGlurthComment by Victory Dan Greene
http://answers.unity.com/comments/870985/view.html
@NoseKills seems right to me; in fact, for computing lift, you probably just need the dot product of the velocity and airplane.up (or wing.up if it's appreciably different).Wed, 07 Jan 2015 15:01:56 GMTVictory Dan GreeneComment by NoseKills
http://answers.unity.com/comments/870684/view.html
From what i understand you should project velocity to the plane defined by airplane.up and airplane.forward vectors, and take the angle between that vector and airplane.forward.Wed, 07 Jan 2015 07:12:41 GMTNoseKillsComment by gamedevpadawan
http://answers.unity.com/comments/870297/view.html
Second picture shows what I want to avoid. The angle I want to obtain is Angle of Attack. IRL angle of attack is angle between airfoil chord and air streams. My air stream in this case is velocity. Problem with velocity is showed on second picture. When we look at plane from above the velocity aka air stream vector should be always parallel to plane vector3.forward . When we look at plane from side the air stream vector should rotate like a hand of a clock. The airstream vector should be like without one local axis.
English is not my native and especially the specialized (like math or physics concepts) makes me problems. I am sorry if explaining imprecisely.
The projection plane should be perpendicular to wing (it should cut wing)Tue, 06 Jan 2015 18:36:13 GMTgamedevpadawanComment by Owen-Reynolds
http://answers.unity.com/comments/870239/view.html
The trick is to think of _which_ 2D plane to measure over, which is usually called a projection. The second picture, it measures over the "real" 2D plane glued to the front of that wing (which is easy, and doesn't even use projection. Just `Vector3.angle`)
The first picture, it looks maybe like the 2D plane is going straight down from the from of the fuselage (but not sure, it has to do with lift?) In that case, you project each vector onto that plane, and then measure.
But it starts with figuring out exactly which plane (does yours tilt when the plane rolls?)Tue, 06 Jan 2015 17:08:45 GMTOwen-Reynolds