Hello everyone!
I have a problem with that the camera won´t switch in cutscenes.
My main camera is a third-person using Cinemachine, maybe that´s the problem?
I tried adding the "Basic camera" component to it, but then I just get a "Display 1 No cameras rendering" screen on playstart.
Everything in my examples works except the camera switches, it just stays on my main camera.
Example 1:
Here´s my scene start ActionList. I want the scene to start with my "StartCamera", fade in, then the player line pops up and as the player clicks away from the dialogue the camera switches to the main, third-person camera.
Example 2:
The collapsed nodes are adding objects which play a sound, everything works except the camera doesn´t switch.
Thank you for any help!
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @imie.
At least in the first case, your OnStart cutscene is run before any gameplay - so you should uncheck Return to last gameplay? and assign the exact camera you want to switch to.
But the use of Cinemachine is another issue - it's a separate camera system, and needs to be set up correctly in order to use with AC.
How exactly have you set up your Cinemachine camera(s) to be used with AC? See the Manual's "Working with Cinemachine" chapter for a rundown on how best to set things up.
AC and Cinemachine work quite similarly, in that both only perform rendering with a single camera (AC's MainCamera, and CM's Cinemachine Brain) - while other cameras (AC's GameCameras and CM's VirtualCameras) are purely used for reference.
To make use of Cinemachine in AC, you want to attach the Basic Camera component to your Cinemachine Brain. You can't use the provided *Camera: Switch** Action to switch between Virtual Cameras, only between AC GameCameras and the Cinemachine Brain.
It would be best to confirm this really is the source of the problem by testing the switching to a regular AC GameCamera at the end of your Cutscene - again, uncheck the "last gameplay" box and assign a camera directly. Assuming that works, share some screens showing how you've set things up, and we'll try to see what's what.
Thank you for the help, warm welcome and a wonderful asset!
I started learning AC recently to create a demo for my Bachelor´s thesis and am very excited about creating things with it in the future.
I went through your suggestions but still haven´t managed to switch cameras, the reason I went with Cinemachine is that I couldn´t get the AC third-person to work, so maybe it´s better to just figure that out instead.
When I add a Third-person camera from AC I get the following error:
The game plays but the camera is stuck in its position, I also can´t move the player and it doesn´t start on the PlayerStart.
The error suggests you don't have a MainCamera in your scene - and this would actually be the cause of your first issue as well, if that's the case.
Is that the only error you're getting? What are your AC and Unity versions?
AC will create a MainCamera when you use the Scene Manager to organise your scene objects - but you can configure this manually as well. Just take your existing Main Camera in the scene (or add a new one and name it as such if you haven't got one), and attach AC's MainCamera component to it.
Also be aware that AC has a more advanced third-person camera available on the Downloads page, which you may find more suitable.
I attached the MainCamera component to the Cinemachine Brain, but the camera doesn´t become available in the SceneManagers default camera field or camera actions. Now I get the following error instead:
NullReferenceException: Object reference not set to an instance of an object
AC.MultiSceneChecker.Awake () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:44)
It´s the only error, I´m using Unity 2019.3.14 and Adventure Creator 1.71.8
For the recommended Cinemachine integration, don't put the MainCamera and Cinemachine Brain components on the same GameObject. AC's Basic Camera component should be added to the CM Brain instead, with the AC MainCamera being on a separate GameObject.
We can get Cinemachine working later, but leave it out of the scene for the moment while we address this wider issue.
The error message suggests that you have a MultiSceneChecker component in your scene on a GameObject that does not also have a KickStarter component. Have you added or modified such components in your scene manually?
Both of these, and more, should be present on the GameEngine object in your scene - and the Scene Manager adds this automatically when you use it to organise your scene objects.
If you're not sure, try running a fresh scene by creating a new Unity scene, and using the Scene Manager to organise it. Let me know if that has the same issue or not. If it does, what is the state of the GameEngine object that should now be present?
I can't offer much more insight without seeing more details - can you share screenshots of what AC objects / components are in your scene?