09-28-2017, 11:33 AM
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.

