How to a straight line between two points to appear on the surface of the 3D Model?

The image above is an example I want to make. Also, how do I make the points connect automatically?

I want a straight line between two points to appear on the surface of the 3D Model.

my current work

From just an image I can’t tell at what stage you are in your code, what I can tell is that you need to use a raycaster (some raycatsing examples), take the intersection coords of the first click with the house model as Vector3, then take the coords of the second click instersection and draw a line in between.

You may also need to run more test to check if the two click are on the same plane, in the video the surface is conveniently flat, on your model it’s not, that may add another level of complexity, again without a code sample I can’t tell.

2 Likes