private static MyQuaternion GetCrossoverRotation(MyVector offset, double distance, double radius, bool isLeft) { MyVector straight = new MyVector(0, -distance - radius, 0); MyVector angled = offset - new MyVector(0, distance + radius, 0); double angle = MyVector.GetAngleBetweenVectors(straight, angled); if (!isLeft) { angle = angle * -1d; } return(new MyQuaternion(new MyVector(0, 0, 1), angle)); }