Added custom quaternion to matrix function.

Trying to identify source of rouge transformation.