Vector pitch,yaw, from one point to another in 3d?
BlitzMax Forums/BlitzMax Programming/Vector pitch,yaw, from one point to another in 3d?
| ||
Ive been wracking me head around this for the better part of a week now and still haven't got anywhere good so I thought I would come to the best place for help. My question is simple if I have a 3d point and another 3d point is there an easy way to get the Euler pitch, yaw, and roll angles between point a and point b. Yeah there are loads of pointentity stuff but I they operate on quaternions etc and tbh its way over my head. |
| ||
VectorPitch and VectorYaw? |
| ||
Hmm I just wanted to get the pitch, yaw, roll from a to b, I probably didn't explain that bit properly :) |
| ||
The vector from point1 to point2 is defined by dx = x2 - x1 etc. Then yaw = -ATan2( dx, dz ) pitch = -ATan( dy / Sqr( dx*dx + dz*dz ) ) Vector roll is meaningless. I did this by writing down what I visualized and then testing against VectorYaw and VectorPitch in Blitz3D. As a result I had to add the minus signs. Those left handed coordinates get me every time. |
| ||
Thanks Floyd ya saved me loads of time :) |