I have 2 3D points and I need to get Yaw and Pitch between then in radians.
I've tried s many formulas but it just doesn' work.
My coordinates system is the following:
X= left right
Y = forward backward
Z = up down
Any help? And please be specific. I would really appreciate the whole formula.
You can use the formulas I posted here to calculate the yaw ("heading") and pitch between to points. The only difference is that my calculations take in a single point (the other point is the origin,
(0,0,0
). You can still use the same calculations though, simply subtract pointB from pointA, and feed it into the functions.For example, if your two points are:
First subtract pointA from pointB:
Then name this new point pointC. Now use the same calculations as in the linked post between the origin and pointC. You will get the distance between the two points, the yaw (heading) between the two points, and the pitch between the two points.