Two lines,The theoretical position is different from the displayed position

Draw a line through two points, Draw another line through two points. Theoretically one vertex on one line should lie on another line. But the actual display is not. May I ask why this is?

Because shape of world,

First line has two point and when you draw on world it change to cartesian it means 3 dimensional x, y z. You need to find middle of your line as cartesian.

You draw line on sphere.

And second line below because your coordinate equal that cartesian of sphere surface.

Thanks for your answer me. but I have a another question.
The clampToGround of the red line is true,so I think the coordinates of the line is on the sphere surface.
And so is the other line.
In the same mode, I think their coordinates are the same. Could you explain it in more detail?

can you share your code on sandcastle I can see more detail with it.

1 Like