有人能说清楚为什么我从{x:0.50516157,y:-0.62950189,z:0}这样的位置值得到{x:Infinity,y:-Infinity,z:-Infinity}的原因我正在尝试将我的位置矢量投影到相机上。我在此找到了类似的查询Converting World coordinates to Screen coordinates in Three.js using Projection,但解决方案并没有解决我的问题。如果有人可以帮助我,那将真正有助于充分和节省时间。
var screenvector = new THREE.Vector3();
var position = new THREE.Vector3();
position = convertLatLontoVec3(lat, lng).multiplyScalar(radius);
//convertLatLontoVec3(returns new THREE.Vector3(x, y, z);)
screenvector.copy(position);
//till here during debugging i can find the values of position.x, .y, .z
screenvector.project(camera); //But once this step is executed all the values are becoming infintiy. I don't understand why is it happening.