I'm trying to find the point coordinates on the edge of a circle like this:
- The coordinates of Point A
- The coordinates of the centre of the circle (Point B)
- The radius of the circle
I've tried the following (the problem is a 2D issue within a 3D environment, so 'z' axis is always zero):
var direction = PointB - PointA; Vector3 left = Vector3.Cross(direction, Vector3.up).normalized * radius; var meetingPoint = new Vector3(left.x, 0, left.z).normalized * radius;
This provides a point which is close, but not quite right. The solution can use either 2D or 3D methods.