Ok so, I need to get a 2D angle between two GameObjects in 3D space. the 2D angle needs to be based on one of the objects up value.
Here’s what I have so far:
_
// gets diretion

First of all there is nothing like a 2d or 3d angle. An angle is a 1d scalar value. What you mean is a “signed” angle based on some reference. Any angle has small and a large angle since you can always do 360°-a to get the other one. Even in 2d it’s not clear / obvious which angle is meant (the small or the large one). In 2d one could easily use the winding order as a hint In 3d the hint has to be more precise since the two vectors can lie in any 2d plane.

If you want the angle in the horizontal plane, just make sure you eliminate the y components of your vectors before you calculate the angle. If you want the angle between your given vector and the forward vector of an object, you can use the dot product between your given vector and the “right” vector of your object to determine the sign.