jscastro76 / threebox

A Three.js plugin for Mapbox GL JS, with support for animations and advanced 3D rendering.
Other
562 stars 148 forks source link

What's the unit of the raycaster.intersectObjects point by click event? #345

Closed geobuilding closed 2 years ago

geobuilding commented 2 years ago

when click the model,the workflow:

  1. queryRenderedFeatures(e.point) |
  2. get intersects (the below pic) |
  3. selectedObject.selected = true

What is the unit of the intersect object point(2) ? meters? we want to convert intersect point xy to lnglat, This lnglat is different from the lnglat obtained by mapbox click event.

image
jscastro76 commented 2 years ago

Based on threejs documentation it’s the point of intersection in world coordinates