I’m working on a 2D project using virtual cameras in each “room”. The rooms are different sizes and are larger than the screen, so as the character moves, the camera will follow them around. I’m working on transitioning my character from one room to the next, similar to in 2D Zelda or Mega Man - a 1-2 second scroll from “room1” to “room2”. The problem I have is when I use the blending options from the Main Camera menu to work with the virtual cameras, I get an issue where once I hit the box collider 2D that separates the rooms, the transition starts at a different location in my “room1” before catching up to the character’s location in “room2”. How do I get it to blend from where my character was in the first virtual camera to where my character is after hitting the collider at his new position in room2? Also as a side note, how do I “freeze” my character and all enemies in room2 until the 1-2 second blend is completed?
I appreciate any help or guidance. I had looked around for the past few days and couldn’t find anything previously that would help me. Thank you.
1 Like
Sounds like user error. Vcam blending should blend from the current vcam position to the new one. There should be no pop at the start of the blend. Can you show some images of your setup? Also what version of Unity and CM?
I’m sure it is user error on my end. Just started trying to learn here doing some online tutorials and am just in the process of playing around and seeing what I can create.
Here is my Main Camera Settings
Room 1 (actually titled “Town1”)
Room2 (titled “Lighthouse”) and my collider options that triggers the blend
What’s this “CameraMovement” script? That’s probably the source of the problem.
Can you show the project hierarchy? I need to see the brain, the player, and the vcams.
Also what version of Unity and CM please.
I disabled the CameraMovement script in the project, that was the script I was using prior to using Cinemachine. I am using Unity 2018.4.14f1 Personal and Cinemachine 2.2.9

virtual cam for lighthouse
ok, thanks for all that info.
Your hierarchy looks good.
Let’s try simplifying a few things to eliminate variables:
- Delete your custom blends
- Change the brain’s default blend to ease in/out 2 seconds
- In both vcams, set the Blend Hint to None, and uncheck “Inherit Position”
Now, when you activate the second vcam, do you get a smooth transition?
I tried those settings (had them before I messed around with various changes) and still the same problem.
If you’d like to PM me your project I could have a look.
I’ll do that. At work now, but will do it when I get home. How do I send over the project?
The best way would be to export a unitypackage, but if it’s small enough you can zip it up. Then attach it to your message, or post it to some other place and send me a link.
Here, exported it. Wasn’t sure how to send it through the Conversation option privately, as there was no Upload File option.
5348208–540048–PracticeGame.unitypackage (1.02 MB)
Thanks for that. The problem is that you’re deactivating the outgoing collider before the blend is finished. You have to keep it active. When I change your FrameSwitch.cs to not deactivate the outgoing frame, the blend is nice.
Note that you should keep all the vcams at the same priority, and let Room.cs handle the vcam activation. If you overlap the room colliders a little, then you could eliminate the need for FrameSwitch logic altogether, and get rid of the Edge collider objects.
Thanks! That did the trick. I just got rid of the Edge Collider objects and my player is moving flawlessly between the two areas.
I only bumped up the priority for my town vcam which is where my player starts. If I had moved it down to the other priorities, I find my camera starts in the forest area while my player is still in the town.
1 Like