@cristian, interesting I ran your solution and even though it works almost perfectly, it doesn't quite return the correct rotation. The atan2 method does. Unfortunately my vector math is a bit too rusty to tell you what goes wrong...