我有射线和飞机。射线与平面相交,我想知道在哪里。我如何获得这个交叉点的世界坐标?
(我的特殊情况是我将屏幕坐标取消投影到相机并创建射线。平面是场景的地面)
var vector = new THREE.Vector3( mousePosition.x, mousePosition.y, 1 );
projector.unprojectVector( vector, camera );
var ray = new THREE.Ray(
camera.position,
vector.subSelf( camera.position ).normalize()
);