I am currently developing an application similar to the threeJs editor. In this project, I have implemented four different cameras, each with unique names and positions. Here is an example of one of the cameras:
cameras['home'] = new THREE.CombinedCamera(window.innerWidth / 2, window.innerHeight / 2, 70, 1, 1000, -500, 1000);
cameras['home'].lookAt(centerPoint);
However, when I attempt to use a raycaster with the selected camera:
raycaster.setFromCamera(mouse, selectedCamera);
var intersects = raycaster.intersectObjects([sceneObjects], true);
I encounter the following error message:
'THREE.Raycaster: Unsupported camera type.'
In order to address this issue, I made modifications to the Three.js code:
Raycaster.prototype = {
...
setFromCamera: function ( coords, camera ) {
if ( (camera ) ) {
Despite these changes, the Raycaster functions properly. I am curious as to why the CombinedCamera is not compatible with the raycaster.