最終的には、カメラに取り付けられたオブジェクトの周りに立方体を設定し、次のように合計された頂点から光線を放ちました。
vertices = coll.getObject().geometry.vertices;
rad = coll.getObject().boundRadius+1;
var directions = {
"up": [4,1],
"down": [6,2],
"front": [3,4],
"back": [7,0],
"left": [5,6],
"right": [1,2],
};
var collisions = {
"up": {},
"down": {},
"front": {},
"back": {},
"left": {},
"right": {},
};
for (key in directions){
(directions[key].length > 1) ? localVertex = vertices[directions[key][0]].clone().addSelf(vertices[directions[key][1]].clone()) : localVertex = vertices[directions[key][0]].clone();
globalVertex = coll.getObject().matrix.multiplyVector3(localVertex);
directionVector = globalVertex.subSelf( coll.getObject().position );
ray = new THREE.Ray( coll.getObject().position.clone(), directionVector.clone().normalize(), 0, 1000 );
intersects = ray.intersectObjects(obj, true);
if (intersects.length > 0) {
distance = intersects[ 0 ].distance;
if (distance >= 0 && distance <= rad) {
collisions[key] = intersects[ 0 ];
} else {
collisions[key] = false;
}
} else {
collisions[key] = false;
++falseCount;
}
}
}
return (falseCount !== 6) ? collisions : false;