Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
Raycast no golpea a un niño de escena usando Three.js con GMaps

Estoy tratando de golpear a un niño de escena pin con un clic en GMaps, usando Three.js y threejs-overlay-view, pero no puedo hacer clic en el objeto. Raycaster.intersectObjects solo devuelve [].

imagen de alfiler

Aquí hay un fragmento del código, todo funciona bien excepto la parte de la intersección.

 (async () => { const map = await initMap(); const mapDiv = map.getDiv(); const mousePosition = new Vector2(); const raycaster = new THREE.Raycaster(); const overlay = new ThreeJSOverlayView(mapOptions.center); const scene = overlay.getScene(); overlay.setMap(map); ... map.addListener('click', ev => { const {domEvent} = ev; const {left, top, width, height} = mapDiv.getBoundingClientRect(); const x = domEvent.clientX - left; const y = domEvent.clientY - top; mousePosition.x = 2 * (x / width) - 1; mousePosition.y = 1 - 2 * (y / height); // dont get nothing here... raycaster.setFromCamera(mousePosition, overlay.camera); const intersects = raycaster.intersectObjects(scene.children, true); overlay.requestRedraw(); }); overlay.update = () => { // ... and here raycaster.setFromCamera(mousePosition, overlay.camera); const intersects = raycaster.intersectObjects(scene.children, true); ... overlay.requestRedraw(); }; })();

Me alegro si cualquier ayuda, Gracias!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!