Posts: 15
Threads: 8
Joined: Sep 2017
Reputation:
0
I would like to make use of quaternions to set a camera's rotation without having to perform the complex (if indeed possible) conversion to euler angles (band, heading, attitude). Is there any way of doing this that any body knows of?
Posts: 15
Threads: 8
Joined: Sep 2017
Reputation:
0
Thanks the function call does exactly what I need. It simple task of rotating the up and look vectors using the quaternion.
Posts: 15
Threads: 8
Joined: Sep 2017
Reputation:
0
After further testing the first method doesn't always work. In certain orientations it gets it wrong which I think is due to the "gimbal lock" problem but I can't be sure. This may be fixed by apply the bank/heading/attitude rotations in a different order, however, my object can be in any orientation so there is no safe combination of order of application of the euler rotations. The second method works better, although I haven't tested it thoroughly yet. I set the target position to 0 and the bank etc to 0 then convert the quaternion and offset for the object into a MatrixTransformation3D and apply that.