This should fix the raycasting issues in #2 by disentangling the camera projection matrix and camera world matrix.
Should be able to use raycasting as in the Three.js examples:
var raycaster = new THREE.Raycaster();
var mouse = new THREE.Vector2();
// scale mouse pixel position to a percentage of the screen's width and height
mouse.x = ( e.point.x / threebox.map.transform.width ) * 2 - 1;
mouse.y = - ( e.point.y / threebox.map.transform.height ) * 2 + 1;
raycaster.setFromCamera(mouse, threebox.camera);
// calculate objects intersecting the picking ray
var intersects = raycaster.intersectObjects(threebox.world.children);
This should fix the raycasting issues in #2 by disentangling the camera projection matrix and camera world matrix.
Should be able to use raycasting as in the Three.js examples:
This is demonstrated in
tests/raycast-debug.html
cc/ @peterqliu