I want to find angle between two vectors (or three points). There is a built in function Vector3.Angle but it only gives angle between -180 to +180. So How can I get 360 degree angle between two vectors?
Based on the angle you could map it to the “360” alternative. For instance -90 = 270, -45 = 315. I guess the math/psuedo code is something like:
angle = Vector3.Angle
if ( angle < 0 ) {
angle = angle + 360
}
Assuming there’s not another function that returns the angle you’re after.
But, Vectyor3.Angle will never give negative angle. It will give angle between 0 to 180.
Steego’s link has it right. If you think logically, you will never get more than 180 degrees for an angle the normal way. This is because the most “different” two vectors can be is exactly opposite, which is 180. If you maybe explain the problem a little better, then there might even a better solution than what is in that linked post. It may be that you are already doing things right, but need to adjust the formula a bit.
Remember though, that once you go past 180 degrees, the vector then starts coming back again closer to the first vector. So as the link above points out and handles, you would need another vector or similar to make something different than just the angle difference.