Forum rules - please read before posting.

Switching between GameCamera 2D and MainCamera is not possible?

Hello,

(I did not find another question on this topic)
The first time a scene is created (let's say 2D), the MainCamera also appears. I created another GameCamera 2D camera to change the screen (without using another scene, I assumed it was more efficient that way). When I use a hotspot> Action to Camera: Switch, I choose to go to the created 2D GameCamera. But I realized that I can't go back to the MainCamera, because it doesn't appear as an option in the Camera: Switch. So I think the change can only be made between GameCameras 2D?

How can I get back to MainCamera? If I use the MainCamera or GameCameras 2D (AG) script on one of these cameras, a black screen will appear.

If I give up the MainCamera and use a 2D GameCamera instead, is it possible to somehow affect the application? Because ... you know, it's not "main"? :))

Thank you in advance!

Comments

  • edited July 2020

    AC's camera system works similar to that of Cinemachine, in that the many GameCameras you place down in the scene are purely just reference markers for the MainCamera.

    AC's MainCamera is the only one that will actually do any rendering at runtime. When switching to a GameCamera, it's still rendering from the MainCamera - it's just that the MainCamera has teleported to that GameCamera's position.

    What you'll want to do is create another GameCamera2D in the same position that you want the MainCamera to begin the scene at. You can assign this as the "Default Camera" in your Scene Manager to make it the game's first camera.

    When you want to switch back to this position, just use another "Camera: Switch" Action to go back to this other camera.

    See the Manual's "Cameras overview" chapter for more on this topic. If you're just getting started, I also recommend going through the 2D game tutorial, as it covers AC's key concepts needed to get up and running.

  • I understand. I created another GameCamera2D at the same position with the MainCamera. I just thought that overlapping the two cameras would cause problems.

    Thank you very much :)

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.