Transitions on change scene

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By jospic
:warning: Old Version Published before Godot 3 was released.

Hi,
is there any example that shows how to implement a change scene with animations transition (Tween class?). like a sliding from previous scene to next?
Thanks
-j

Do you have problem with the animation, or the way scenes must be loaded?

Zylann | 2016-04-27 02:24

no problems with the animations, but would like to understand how to apply them to different scenes during loading from previous to the next

jospic | 2016-04-27 07:36

:bust_in_silhouette: Reply From: sergicollado

Check this post, It was useful to me link

Thanks, I know that tutorial, but I need something more complex

jospic | 2016-04-27 11:06

What do you need exactly? Do you need a fade that directly goes from scene 1 to scene 2 without in-between?

Zylann | 2016-04-27 15:12

Yes, this is an idea. But I’d like more of a sliding effect from one scene to the other.
For example, the first flowing to the left side leaving the next scene enter from the right .
Sorry for my poor English, I do not know if I was clear enough.

jospic | 2016-04-27 15:26

:bust_in_silhouette: Reply From: Zylann

If you need to see the two scenes while the transition is active, you have two options:

  1. Make a screenshot of the current scene, put it on a fullscreen quad, unload the scene, load the next behind and do what you want with the sprite and the next scene’s viewport.
    I would choose this solution if your scenes are really big, as it doesn’t requires twice as much memory. Otherwise, I would do 2).

  2. Load the next scene under a Viewport node so you have the two scenes loaded at the same time, but rendering on two different viewports. Then all you have to do is animate those viewports, blend them together with a masking shader, slide their rect etc.

I never experimented with Viewports, but I think that’s what you are looking for :slight_smile:

Many thanks! I’ll try one of two ways

jospic | 2016-04-27 16:03

I implemented the Viewport idea and since it was working well, I made a basic template project that demonstrates how it works, just in case that someone else needs it: GitHub - reyalpsirc/godot-start-template: Basic godot template with menu/scene transitions

Reyalpsirc | 2019-03-31 01:42