Closed AHSss closed 7 months ago
I get the same problem and found a solution. I discarded the objects witch is not visible, and intersect only visible objects.
let allMeshs = []
tileset.children.forEach(d => {
if (!d.visible) {
return
}
d.traverse(e => {
if (e.isMesh) {
allMeshs.push(e)
}
})
})
const intersects = raycaster.intersectObjects(allMeshs)
if (!intersects.length) {
return null
}
return intersects[0].point
Thanks very much !!!I tried your solution and it‘s solved my problem. It took a long time, but you did help me. Thank you again, my friend. @wanyanyan
When I used the raycaster in threejs to get coordinates of some points on 3dtitles-model's surface . But sometimes coordinates witch I got was not on the surface . It seems raycaster get the lower LODs model‘s surface . How can I avoidance the lower LODs model‘s surface ?Or how can I got the right coordinates of points on 3dtitles-model's surface?I need your help!Thanks very much! @Avnerus