Forum rules - please read before posting.

Game Camera 2D not working by default

Hi!
I'm having some issues with the ac camera.
I have a project that I have been working on for a month and until a few days ago my cameras were working perfectly. But suddenly it seems that the main camera has become disconnected from my AC camera.
Now when I run my project, the camera that I had configured until a few days ago (with horizontal movement following my character) has stopped running and only the main camera works now (which does not follow the character and is the original Unity camera).

However, while testing I have discovered that if I add a trigger with a " Switch camera" interaction, I can recover the functionality of my 2d camera by making my character step on the trigger...
This is the only way I have been able to recover its functionality, but of course, it doesn't seem to me a very practical configuration to have to place a trigger to have my 2d camera working :)

I have tried to fix it by deleting my 2d camera and creating a new one, even deleting my main camera and creating a new one by hand, but nothing seems to fix the problem.

I'm assuming I've accidentally disabled a function, but I can't figure out which one ^__^ When my camera stopped working I was working with unity lights and applying some Sorting layers for the sprites... I think I changed the name of my main camera at some point, but I don't know if that has anything to do with the issue.

Here are some screenshots:

https://ibb.co/r3RYg90

https://ibb.co/xGLDjTj

Thanks!

Comments

  • What are your AC and Unity versions, and does this occur in every scene or only this one?

    Does this issue occur when beginning the game from this scene, or only when entering from another? If another PlayerStart is being used, then the Camera associated with that will be used instead.

    Go to the bottom of the Settings Manager and enable the "AC Status box" under the Debug settings panel. At runtime, you'll then get a box in the upper-left corner of the Game window, displaying key information.

    This should include the active GameCamera - is "2DCamera_1_Floor" named there? Check your Console window for any related messages as well.

    As a last-resort, you should be able to "brute force" things by creating an "OnStart" Cutscene that switches to the camera.

  • Hi Chris.
    Thank you so much for your help.
    I'm Using Unity 2021.3.4f1 (LTS) and AC v1.75.3. I only had one scene in my game, so I didn't switch scenes, cameras or characters,

    I found the problem by checking your instructions.
    I hadn't thought about the possibility that the problem could be linked to the characters.

    By activating "Show 'AC Status' box the game show me no camera info:
    https://imgur.com/a/o3gGwK0

    And then I checked the console carefully. I should have started there, but I don't know why I was obsessed with the **camera **inspectors.
    I found a suspicious error linked to the character:
    https://imgur.com/a/XVj6c7N

    I tried to update my prefab character but unity wouldn't let me. In the end I decided to unlink my character prefab (in my project folder) from AC (Settings - Character Settings). Now, with the prefab field empty, the camera works.

    I think my character prefab somehow got corrupted somewhere in my process. I will create it again. But so far with the empty character prefab everything is working properly.

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.