Hi.

I have two objects in 3d world and I want to calculate the angle between the two with only x and z values.
How can I subtract the y value from Vector3.Angle or is there a way I could use the Vector2.Angle but with x and z values instead of x and y?

Thanks!

float angle = Vector3.Angle(new Vector3(v1.x, 0, v1.z), new Vector3(v2.x, 0, v2.z));

Or…

float angle = Vector2.Angle(new Vetor2(v1.x, v1.z), new Vector2(v2.x, v2.z));

Either of those should work.