Hello community

Here is my situation in 2D Unity:

I have a linerenderer. The renderer has two points. I want the linerenderer to have a collider so baseically I make a collider that is big enough and then want to rotate the gameobject it is on by the angle PointA has to PointB.

So for example:

PointA = -10, -10, 0

PointB= 10, 10, 0

The angle between them is 45°

I wanted to use Vector3.Angle() to get this angle but it always returns a value that is almost 180°. Its never exactly 180° though.

So, does anybody have a solution to this problem and could also explain the reason for this angle-madness to me because I will probably need it again and would like to understand it

Thanks in advance