THREE.ArrayCamera Layers doesn't work

I have a THREE.ArrayCamera with 4 cameras and trying to make my object visible from only 1 camera. I saw I can use Layers, which work well when I have 1 camera and doesn’t work at all with Array cameras. Object isn’t visible inside all cameras, despite it has layer 1 and camera.cameras[2] has layer1 enabled. JSFIDDLE:

    mesh = new THREE.Mesh( geometryCylinder, materialCylinder );
	mesh.castShadow = true;
	mesh.receiveShadow = true;
	scene.add( mesh );
    var material2 = new THREE.MeshPhongMaterial({color: 0x00FF00});
    mesh2 = new THREE.Mesh( geometryCylinder, material2 );
	mesh2.castShadow = true;
	mesh2.receiveShadow = true;
	scene.add( mesh2 );


I’ve written an answer at stackoverflow.

1 Like