我想要一个透视相机和一个相互垂直的相机.它们处于相同的位置、方向,zar平面也完全相同. 问题是,即使近处和远处的值是相同的,我得到的z值也不同,遮挡是错误的.想要我失踪吗?
const perspective_camera = new PerspectiveCamera(55, canvas.width / canvas.height, near, far);
const half_width = perspective_camera.far * Math.tan(perspective_camera.fov * 0.5 * (Math.PI / 180));
const half_height = half_width / perspective_camera.aspect;
const ortho_camera = new OrthographicCamera(-half_width, half_width, half_height, -half_height, near, far);
// Here one example of the problem in the Z
const aux1 = new Vector3(0, 0, 1);
const aux2 = new Vector3(0, 0, 1);
console.log(aux1.project(ortho_camera), aux2.project(half_height));
// Object { x: -0.00003130777409465268, y: -0.000001186705638256526, z: -0.999202652754963 }
// Object { x: -0.07660902355148393, y: -0.0029038270148180447, z: 0.9510807024824749 }