Hello,
I want to know if an another gameobject is behind, in front of, above, below, etc from my player gameobject.

Whats the fastest (low overhead) way to do this?

I was thinking to calc the yaw and pitch of the other gameobject.from my player gameobject so a yaw and pitch of 180 would be behind my player. yaw and pitch of 0 would be in front. A yaw of 90 and pitch of 0 might be right or left depending on direction the yaw value is increasing. A pitch of 90 and yaw of 0 would be above or below, again based on the direction the pitch.value is increasing.

Is this a fast efficient way? If so, next question, of course…

Given two game objects how can I get the yaw and pitch from one of the gameobjects using its forward vector?

Get the sign of the Vector3.Dot operation between the player object’s forward / up / right vectors and the relative position of the other GameObject. Example assuming this script executes in your player GameObject:

Vector3 relativePos = otherObject.transform.position - transform.position;
bool isInFront = Vector3.Dot(transform.forward, relativePos) > 0.0f; // Otherwise is behind
bool isAbove = Vector3.Dot(transform.up, relativePos) > 0.0f; // Otherwise is below
bool isAtTheRight = Vector3.Dot(transform.right, relativePos) > 0.0f; // Otherwise is at the left

This way you’ve divided the space in 8 quadrants relative to the player, and you can quickly figure out which quadrant any other object is in.

Thanks, converted your code as follows and this gets me 3/4 way (maybe) to yaw and pitch and gives me the position based on gameobject forward coordinate system.

You can make it faster though. When you write transform.right, what happens under the hood is transform.rotation * Vector3.right, so you currently have 3 Quaternion * operations and 3 completely useless Vector3.Dot operations.