+5 votes

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?

in Engine by (1,469 points)

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

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

2 Answers

+4 votes
Best answer

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 :)

by (28,789 points)
selected by

Many thanks! I'll try one of two ways

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: https://github.com/reyalpsirc/godot-start-template

+3 votes

Check this post, It was useful to me link

by (68 points)

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

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

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.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.