My camera2d is set to current but the content beneath the default viewport camera location is the only thing displayed

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CaptainCrouton89

Okay, apologies in advance for any incorrect assumptions I have about viewports and cameras and whatnot—I only recently started working with Godot.

So far, my project is pretty simple. You click a button, you switch scenes, that’s it. However, my new scene has a camera2d in it, and even when I’ve set it (using both the inspector and programmatically) to the current camera (not use camera.current = true, but using the proper “make_current()” method), it does not update the screen to the new position. Does anyone have any ideas on what could be going wrong?

:bust_in_silhouette: Reply From: EmptySpace

Ok this to late but someone may enter this issue.

If anyone searching for this you just need to set the camera2d current to false and true again it when loading the screen done.

like me I have ViewportContainer I can call down to get_node(“Viewport/TheSceneYouJustLoad/Camera2D”).current = false
get_node(“Viewport/TheSceneYouJustLoad/Camera2D”).current = true

It will fix it. I don’t know how to repo this issue but it just need to set false and true to work.