need to find angle 1

The angle is already in degrees, so converting from radians to degrees will give you a wrong answer.

For some angles, the atan2 function will avoid division by 0.

~~For your setup, you only need Ball1 and Ball2:~~

~~angle = atan2( (Ball2.Y - Ball1.Y), (Ball2.X - Ball1.X))~~

(I forgot that Canvas Y runs downwards, not upwards)

Upload your .aia so I can test?

angle = atan2(Y1-Y2,X2-X1) - atan2(Y1-Y3,X3-X1)

because the angle is the difference between the angles of points 2 and 3 off the X axis.

I reversed Y directions for the Canvas.

not solved also

P.S. The Balls look nicer if you set their origins to their centers, instead of their upper left corners.

Thank you very much, that's what I'm asking

If so, can you give me references for the solution?

My high school trigonometry class 60 years ago?

P.S. I had to remove that maths extension.

It was crashing in the Companion, and it was not needed for this example.

math extension

I was just looking for a solution

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.