/// <summary> /// Using Unity Debug, draws the x,y,z axis of a Quaternion as x magenta, y yellow and z cyan /// </summary> /// <param name="rot">The OpenTK Quaterion</param> /// <param name="pos">The UnityEngine Vector3 position to be drawn</param> /// <param name="scale">The float length of the axis in meter</param> public static void DrawRays2(Quaternion rot, Vector3 pos, float scale) { OpenTK.Vector3 right = OpenTK.Vector3.Transform(OpenTK.Vector3.UnitX, rot.Convert()); OpenTK.Vector3 up = OpenTK.Vector3.Transform(OpenTK.Vector3.UnitY, rot.Convert()); OpenTK.Vector3 forward = OpenTK.Vector3.Transform(OpenTK.Vector3.UnitZ, rot.Convert()); Debug.DrawRay(pos, right.Convert() * scale, Color.magenta); Debug.DrawRay(pos, up.Convert() * scale, Color.yellow); Debug.DrawRay(pos, forward.Convert() * scale, Color.cyan); }