Three.js光线投射总是返回空数组

时间:2015-09-06 13:37:06

标签: javascript three.js raycasting

我的场景中有很多物体,但是交叉变量总是返回一个空数组,任何想法?

var mouse = new THREE.Vector2((event.clientX / window.innerWidth) * 2 - 1, -( event.clientY / window.innerHeight ) * 2 + 1);
var raycaster = new THREE.Raycaster(); //new THREE.Raycaster(camera.position, mouse);
raycaster.setFromCamera(mouse, camera); 
var intersects = raycaster.intersectObjects(scene.children, true);

0 个答案:

没有答案