您好我尝试使用raycast捕获三个js中的文本对象的点击事件。
下面是我的代码段
// CLick event binding
var mouse = new THREE.Vector3();
mouse.x = (event.clientX / window.innerWidth) * 2 - 1;
mouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
// mouse.z = 0.5;
// mouse.normalize();
var raycaster = new THREE.Raycaster();
raycaster.setFromCamera(mouse, camera);
var intersects = raycaster.intersectObjects( sceneObjects);