0
我看到示例代码全部具有一段代码为:Three.js raycaster究竟在做什么?使用three.js所碰撞检测
var vector = new THREE.Vector3((event.clientX/window.innerWidth) * 2 - 1, - (event.clientY/window.innerHeight) * 2 + 1, 0.5);
projector.unprojectVector(vector, camera);
我的问题是,什么是event.clientX/window.innerWidth)* 2 - 1 &事件.clientY/window.innerHeight)* 2是否正确?为什么这些价值?
我需要编写一个正交相机撞击检测代码,但我首先需要了解透视相机案例中发生了什么。