Maybe you guys can help me out. I have been trying this for days.
I have this 3D space game and want an indicator (2D arrow in the center of my picture) that points in the direction to turn my ship in 3D space. (Up, down, left, right) so that it always points to the shortest angle to the selected object, regardless whether my ship is facing the object or not.
I have the coordinates of the selected object and the player as well as the angle in which the player is facing. Basicaly;
Vector3 PlayerPos;
Vector3 SelectedPos;
Vector3 PlayerDirectionEuler; or even better Quaternion PlayerDirectionQuaternion;
I have tried so many things, asked and have had so many wrong answers, I can't even remember the 1000 things that didn't work.
The perfect result for me would be a floating point indicating the rotation of my angle in the Z axis.
Please someone give me a hand with this.... It looked so easy when I started but now I am desperate.