Hi everyone,
I'm having some trouble with camera switching with my AC/UFPS project, but it comes down to something simpler than that. I think I probably don't have everything set up properly.
If my understanding is correct, the main AC camera is supposed to be the only renderer in the scene: every other camera is just a reference for position and rotation, including the main UFPS camera. The idea being that the UFPS input controls its position and rotation, and the main AC camera does the rendering work. This makes sense when looking at camera switching, which is where I started to notice that my project wasn't working as it should. I discovered that I ended up with multiple cameras active in my scene, which was hammering my performance when it comes to culling.
So I put together a test project, but I can't for the life of me get it to behave as expected: the main AC camera always stays put, never updating its position. I'm using the AC-made UFPS prefabs, as standard as they come, and a standard AC MainCamera, with the only change being the removal of the Audio Listener component.
I would expect the AC camera to "follow along" - to update its position and rotation along with the UFPS camera, but it simply doesn't do this. Am I doing something wrong, or am I expecting the wrong behaviour?
The movement method is set to Ultimate FPS, and the player prefab is assigned. I'm not sure what other settings would be pertinent, but as mentioned, the AC and UFPS game objects are stock standard.
Comments
AC's mainCamera should disable itself as appropriate - when you cut the camera during a cutscene, for example, it'll re-enable itself.
The MainCamera should attach itself to regular AC cameras when enabled - is this happening, even if you're still viewing through your UFPS camera? It's not clear from your description what exactly is occuring.
If it is enough to prevent the culling data, disabling the Camera component should be enough - though this should be done automatically when the cutscene ends. What is the exact state of the MainCamera (component checkboxes, etc) after the cutscene compared with before the cutscene?
I've recreated the issue and will fix it for v1.47a. That is, so long as disabling the Camera component will do the trick.
Then cut to this camera instantly before switching to a close-up camera (and vice-versa). The AC MainCamera can only transition between AC cameras - not the UFPS one - so this would "mask" the problem.