How can i rotate a quaternion around its z-axis in order to make the x-axis point towards a certain (x,y)-point?
I have been able to calculate quaternions by rotating a unit vector [0,0,1] onto another unit vector, thus getting the direction along the z-axis i need. Now i would like to rotate that quaternion further to make its x-axis point (in the x-y plane) towards a given (x,y)-point.
I used Jur van den Berg's method from Calculate Rotation Matrix to align Vector A to Vector B in 3d?
I hope you can help, thank you!