在使用threejs选择collada模型的不同部分时遇到问题。使用raycaster,我能够检测到网格,但是无法检测到collada模型(在中间)。 click here for image
这是我的代码块。
MouseDownListener: function(event) {
this.projector = new THREE.Projector();
console.log("Mouse DOWN");
this.vector = new THREE.Vector3(( event.clientX / window.innerWidth ) * 2 - 1, -( event.clientY / window.innerHeight ) * 2 + 1, 0.5);
this.projector.unprojectVector(this.vector, this.camera);
this.raycaster = new THREE.Raycaster(this.camera.position, this.vector.sub(this.camera.position).normalize());
var intersects = this.raycaster.intersectObjects([this.cube, this.cube2, this.dae]);
},