I'm trying to achieve a smooth transition between two scenes where the player stays rendered but the level fades directly from one to the other around him. No fading to black.
My particular use case is transitioning from exterior to interior. The exterior and interior worlds are independent of each other and inhabit much of the same space. Therefor I can't just have a sprite of a building and alpha-fade that.
Obviously when inhabiting one or the other area entirely, I just turn the other one off. The issue is entirely in the transition where I want to render one on top of the other and fade between.
I don't have much experience with Viewports, but my thought was that I could use a ViewportTexture on top of the other Viewport and fade the alpha on that texture. However, I'm not sure what the scene-tree setup for this would be. I haven't completely wrapped my head around Viewports, Camera2Ds, World2Ds, and how they relate with what they're rendering. I also need to ensure that both Viewports are rendering the player, which complicates things.
Is this the best approach? Any advice on setup for this approach? Or any idea for another approach that would work better for this effect?
(Please don't worry about considerations other than rendering such as collisions. That parts easy)