Skip to content

Commit

Permalink
fix(3dtiles): add layer to object returned by OGC3DTilesLayer.pickObj…
Browse files Browse the repository at this point in the history
…ectsAt
  • Loading branch information
jailln committed Oct 11, 2024
1 parent cbfd1bb commit 25467e5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Layer/OGC3DTilesLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,11 @@ class OGC3DTilesLayer extends GeometryLayer {
_raycaster.far = camera.far;

_raycaster.firstHitOnly = true;
_raycaster.intersectObject(this.tilesRenderer.group, true, target);
const picked = _raycaster.intersectObject(this.tilesRenderer.group, true);
// Store the layer of the picked object to conform to the interface of what's returned by Picking.js (used for
// other GeometryLayers
picked.forEach((p) => { p.layer = this; });
target.push(...picked);

return target;
}
Expand Down

0 comments on commit 25467e5

Please sign in to comment.