/// <summary> /// Modifies the pitch and roll angle so that the look direction is parallel to the xy plane. /// </summary> public void FlyParallel(int mode = 0) { if (speed == 0) return; targetLook = LookDirection; targetLook.Z = 0; targetLook.Normalize(); targetUp = Math3D.UnitZ; if (mode != 0) targetUp = targetUp.Rotate(targetLook, mode * 15); if (speed == 0 || mode != 0) { UpDirection = targetUp; LookDirection = targetLook; } else { turnToTarget = true; } }