# BP of a PIE direction relative to Actor location

How would one implement something like this?

Whenever Actor A changes his direction, the PIE directions are based on his forward vector. And if we subtract the Actor A location vector and Actor B location vector, we get a line telling which side the Actor B is on based on the PIE directions.

For some reason its only giving me 180 degrees on either side of the character. So CCW turning to Back side, 0 - 180. Then from back to front continuing to turn CCW gives me 180 - 0. I did use this example from answerhub but it seems im missing some implementation on how to get the full pie chart of 360 degrees.

This formula will get you your angle between two objects relative to object A. from there you can write some branch code or a switch that delineates between what the different angles mean, i.e. 0 or 360 = forward, 180 = behind, 90 = side, etc. and handle your desired code from there.

Right is negative, left is positive,
or if you’re looking for the 360 number, instead of multiplying aCos by -1 for option B of the select node, instead, use 360 - aCos result.

 just to clarify, that second vector math node is a cross product, not multiply.

Awesome! Thank you my good Sir! This is exactly what I was looking for. Appreciate the help!