Hi people,
I currently can't wrap my brain around this problem:
[attachment=31181:yawpitch.jpg]
X = Red
Y = Green
Z = Blue
I can calculate the Quaternion for the brown line simply with
yaw = 45;
y_axis = new Vector3(0, 1, 0);
Quaternion around_y_axis = Quaternion.fromAxisAngle(y_axis, yaw);
Based on left/right-mouseinput which adds to "yaw" I can simply rotate the line on the Red/Blue plane, but how can the line be moved up/down based on the top-bottom-mouseinput (pitch)?
The yaw axis is pretty simple, since it's just rotating around (0,1,0), but the pitch axis depends on the around_x_axis-Quaternion now?
I hope somebody can make some sense out of this and can help out with the math. When anything is unclear, please just ask and I will try to explain it better.
Regards,
treeRunner