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 fo
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:
pointA = (20,3,8)
pointB = (34,2,0)
First subtract pointA from pointB:
pointB - pointA = (34,2,0) - (20,3,8)
= (14,-1,-8)
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.