scene.onActiveCameraChanged keeps firing?

Is this expected behavior? I don’t think when you set scene.activeCameras to multiple cameras that this should keep firing off.

It also only ever logs the first cameras name.

It triggers at the beginning of each frame, because the current active camera is activeCameras[activeCameras.length - 1] at that time. Also, the code explicitely doesn’t trigger the observer when switching camera during a frame, that is when looping over the activeCameras array. I find it a bit strange, but the code is setup like this, so I guess it’s a feature :slight_smile: .

if its looping over the activeCameras shouldn’t it alert the observable for each of them then?

Yes, that’s also what I think, but the code is explicitely not doing that, and it would be a breaking change to modify it…

Let’s cc @sebavan, and here’s the comment (in Scene._renderForCamera):

The comment of the PR is not really in line with the code, as the line is not specific to rig camera…