How to define get two arbitrary point on the scene and get the distance between them?

Hello everyone

I am trying to get two arbitrary point on the scene and then I want to get the distance between them,
for doing this I define two impact point and I try to draw a line between them and then get the line length but there are some problem in my code, is it possible to help me how can I solve it?

here is my PG:

This might help start you off


You can use Vector3.Distance(pointA, pointB) as well

1 Like

Thank you so much @JohnK you are great :pray: :pray: :pray:

can I ask another question?
I have use that PG and I have a problem with deleted the previous impact circles and the line, I try to use the dispose() the circles and the lines but I got some errors, how can I deleted the previous line?

I mean I want to delete all of them when I want to start to calculate the new line