Reputation: 31
I would like to know if it is possible to get the Z coordinate of point in three js knowing X and Y of this point. I tested something : I draw a line in this X and Y coordinates and try to get the intersection of this line and the surface(Mesh) generated from tiff file. but many times it tells me that there is no intersection, and if i get one the coordinates of this intersection are (0,0,0). how can I get this Z coordinate ? enter image description here
Upvotes: 1
Views: 637
Reputation: 506
The example under geometry/terrain/raycast does close to what you are asking. (direct clicky)
Short answer: use a raycaster.
Upvotes: 1