I'm working on a top-down 3D game where things spawn off camera. Movement only occurs on 2 axis (x and z). Rotation is about y axis.
The player is in the center of the camera and needs to have indicators at the edge of the screen to show where the item is relative to the players location.
I've managed to figure out the distance from my player to the target just using the distance between 2 Vector3 points.
However, I can't figure out how to translate this into a direction/angle for an indicator arrow that I have instantiated as a child of the canvas UI and make it point to the edge of the screen.