Forum rules - please read before posting.

Action doesn't recognize other cameras in scene

Hi, hope this is in the right category,

We are re-releasing a point and click adventure game, which uses rendered background images that have hotspots that fade into other backgrounds. We were trying to determine whether to use separate scenes for each background, or whether to use one scene for each area, and have multiple cameras that we would switch between whenever the hotspot is selected. We thought that maybe having only one scene would be easier to load, etc. If anyone has advice on this, it would be appreciated.

On to the main issue:
I created a use interaction for a hotspot on one background, that would lead to another camera in the same scene looking at a different background. However, when I select Camera > Crossfade, and try to select the new camera, it only says "None (Camera)." What am I missing here? Why doesn't the action recognize the existing secondary camera already in the scene?

I hope this makes sense. I am new to Unity and Adventure Creator, so any advice is greatly appreciated. Thanks in advance for any help.

Comments

  • Cameras are only visible to AC if they have an AC camera component attached to them.

    For custom cameras, attach the "_Camera" component found in Assets/AdventureCreator/Scripts/Camera.  That will allow it to be useable by AC's camera system.

    Otherwise, you can use the Scene Manager to create your camera objects which already have the correct components attached.

    For more on cameras, please see Section 4 of the updated Manual included with the latest (v1.58) release of AC.  Section 4.3 covers the use of custom camera types.
  • Thank you for your advice. I also realized that I had deleted the main camera, which was also causing issues. I deleted the main camera because I couldn't link to it to crossfade back to it, but I found one of the AC articles that answers the question I think: http://www.adventurecreator.org/tutorials/creating-back-button-during-close-ups. The only thing with that method is that I need to be able to choose from one of several cameras to switch to using multiple hotspots. Sounds like I can use variables, but would it just be easier to utilize multiple scenes instead? Does using multiple scenes cause the game to be heavier? This game is played in first person perspective, but is point and click, so no (visible) player character, and basically just images with hotspots on them. What would you recommend for this scenario? Again, thank you for your advice.
  • I may have found a work-around that might work for our purposes. I think I can completely ignore the main camera, and instead use game cameras for all of my backgrounds. Then I simply set the default camera to the game camera which is pointing at the starting background. From there, I can set hotspots to crossfade to the other game cameras, and not have to return to the main camera at all. I am still very new, so if there is a better or more efficient way to do this, I am all ears. Thanks!
  • Using GameCameras for your camera placements is the intended workflow.  GameCameras are merely "reference points" that the MainCamera switches between at runtime.

    The MainCamera itself can be left alone, as it is handled automatically by AC.  Use the Scene Manager to create a default camera, and then use the various Camera Actions to change which "GameCamera" is active in-game.  The MainCamera will copy the active GameCamera's transform and camera values automatically.

    So far as how your scenes are managed goes, I would recommend keeping each "location" in a single scene, even if each location has multiple views/cameras.  Since all you're using is images for backgrounds, it shouldn't be too memory intensive, and it'll be more convenient to work with.
  • Perfect, thank you so much! This answered my questions. I have a better understanding now of cameras and how to use them. That is what I was thinking about as well, should be organizationally effective to keep each location as a scene.

    Thanks for your advice
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.