Forum rules - please read before posting.

Problem switching between two cameras in the same scene.

Hi.

I have a problem switching between two cameras in the same scene.

In my game upon entering a door I change the camera to another part of the scene. The first camera follows the Player but the second is fixed.

The problem occurs when you return to the first camera. When switching to the second camera, the first camera continues to follow the player and if it is immediately activated, the camera is not fixed to the Player but rather runs the entire route.

In the following video you can see the problem.

My scene:

https://imgur.com/a/W1kjwXt

Sorry, my English is a work in progress.

Thanks!

Comments

  • Ok. With this simply script attached at Gamecamera2D works and sendmessage "TurnOff/TurnOn" on switch camera:

        private void TurnOff()
        {
            GetComponent<AC.GameCamera2D>().enabled = false;
        }
    
        private void TurnOn()
        {
            GetComponent<AC.GameCamera2D>().enabled = true;
        }
    

    :)

  • Welcome to the community, @Robiro.

    Glad you've solved the issue, but an add-on script shouldn't be necessary.

    The video shows the issue, but not how or why it's occuring. What are your AC and Unity version numbers, and can we see the ActionLists involved that switch the two cameras back and forth?

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.