javascript - Three.js raycaster.intersectObjects() get empty array -


i tried make world map three.js, , find https://github.com/ftorghele/worldmap, needed. updated three.js , d3.js version according awesome project, have problem on last step mousemove country name

var vector = new three.vector3( mouse.x, mouse.y, 1 ); this.projector.unprojectvector( vector, this.camera ); var raycaster = new three.ray( this.camera.position, vector.subself( this.camera.position ).normalize() ); var intersects = raycaster.intersectobjects( this.scene.children ); 

i think should change like

let vector = new three.vector3(mouse.x, mouse.y, 1); let raycaster = new three.raycaster(); raycaster.setfromcamera(vector, this.camera); let intersects = raycaster.intersectobjects(this.scene.children, true); 

but intersects empty array.

the content of (this.scene.children) enter image description here

thanks!


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -