If tried searching the internet but I couldn't find the anwser.
I'm trying to calculate the angle between 2 vectors, seen from the first vector.
So if vector 1 is at 0,0 and vector 2 is at 1,1 the heading would be 45.
at 1,0 it would be 90.
at -1,0 it would be 270.
Is there a simple solution to create this?
Given a offset vector (relative to 0,0,0 for instance)
float resultInDegrees = (360 + Mathf.Atan2(rotateVector.x, rotateVector.z) * (180 / Mathf.PI)) % 360;
Note that we're adding 360 and taking the modulus of the result, otherwise you'll get from 0 - 180, then negative angles.. This converts -1 degrees to 359 degrees, as the original poster had requested.