我正在使用raycaster将一个点投射到脸上。但不知何故,这似乎不起作用。即取点(25,25,300)和方向(0,0,-1),raycaster找不到并与位于(0,0,0)的大小(30,30,30)的盒子相交。我做错了吗?
var geometry = new THREE.BoxGeometry(30, 30, 30);
var material = new THREE.MeshBasicMaterial( );
var mesh = new THREE.Mesh(geometry, material);
var dir = new THREE.Vector3(0,0,-1);
var p = new THREE.Vector3(25,25,300);
var raycaster = new THREE.Raycaster(p, dir);
var intersects = raycaster.intersectObjects(mesh); // returns an empty array