How to get the vector direction between two (p1, p2)?
问题 I have been working on Unigine and been trying to code a flight program for weeks, I need to find the direction between two dummy nodes so I can use this direction to rotate the wings of the aircraft. Any explanation would be appreciated. 回答1: First you have to calculate the length of the distance between P1 and P2. distance = abs(P2(y) - P1(y)) Then you can use the angular functions to calculate the angle. a = sin(distance / length(P12)) 回答2: If under the direction you mean angle w.r.t. an