I'm trying to find the point coordinates on the edge of a circle like this:

Circle diagram

I know:

  • 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.

  • 1
    \$\begingroup\$ I've linked this question to two prior Q&A threads about computing these points. If you have any difficulty adapting the existing answers to your needs, you can edit this question to focus on how you've tried to use them and where you got stuck. \$\endgroup\$
    – DMGregory
    Sep 20 at 23:30


Browse other questions tagged .