Check my logic/math
If I have two spaceships, each with a left-handed matrix3x3 orientation and a vector from the first spaceship to the second, then:

* 1) If I multiply the vector by the inverse (transpose) of the first spaceship's orientation matrix,

* 2) I'll get a vector in spaceship 1's Object frame that points towards spaceship 2, in said object frame.

* 3) And, by checking the sign of the horizontal displacement, I can tell whether spaceship 
1 should turn left or right to face spaceship 2,

* 4) By dividing the horizontal displacement by the vertical displacement, I get the cosine? of the angle between them.

* 5) Finally, either can convert into a Y-rotation.

* 5a) I think, for negative vertical displacements, the sign should be flipped for method 4.

One reason I'm checking is, I'm pretty sure I'm seeing the computer spaceship spin around the long way around sometimes. This doesn't make sense, I'm using method 3, currently. "Left of spaceship 1" should translate directly into "turn left"; likewise for "right of spaceship 1"; the long way around should never come up.

Thanks.
Check my logic/math
===

If I have two spaceships, each with a left-handed matrix3x3 orientation and a vector from the first spaceship to the second, then:

* 1) If I multiply the vector by the inverse (transpose) of the first spaceship's orientation matrix,

* 2) I'll get a vector in spaceship 1's Object frame that points towards spaceship 2, in said object frame.

* 3) And, by checking the sign of the horizontal displacement, I can tell whether spaceship 
1 should turn left or right to face spaceship 2,

* 4) By dividing the horizontal displacement by the vertical displacement, I get the cosine? of the angle between them.

* 5) Finally, either can convert into a Y-rotation.

* 5a) I think, for negative vertical displacements, the sign should be flipped for method 4.

One reason I'm checking is, I'm pretty sure I'm seeing the computer spaceship spin around the long way around sometimes. This doesn't make sense, I'm using method 3, currently. "Left of spaceship 1" should translate directly into "turn left"; likewise for "right of spaceship 1"; the long way around should never come up.

Thanks.