let tempV = vector.applyMatrix4(camera.matrixWorldInverse).applyMatrix4(camera.projectionMatrix);
if ( (Math.abs(tempV.x) > 1) || (Math.abs(tempV.y) > 1) || (Math.abs(tempV.z) > 1) ) {
// 在视野外了
} else {
// 在视野内
}
threejs 判断对象是否在视野范围内
猜你喜欢
转载自www.cnblogs.com/minnong/p/12017035.html
今日推荐
周排行