Slide Effect when switching to another scene

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

I’m making a GUI using godot and I want transition animation when switching to another scene instead of instant change (No animation) when using get_tree().change_scene(“MyOtherScene”) I am trying to mimic the ios feel when switching to another scene. Is there any function to accomplish this?

try adding a new scene, displaced sideways by the screen size, have an animation or whatever to switch the scene that is infront of the viewport, and remove the original scene

rustyStriker | 2018-10-05 15:01

otherScene = load("res://scenes/OKR.tscn").instance()
viewportContainer.add_child(otherScene)

But even when I set the margin of the viewport container, the scene child is still rendered at (0, 0)

009820 | 2018-10-06 06:28

:bust_in_silhouette: Reply From: markopolo

I do not know of any built in functionality for fancy scene transitions. However, there are several ways you can do this yourself. Other people (aka Zylann) have already answered better than I can:

Transitions on change scene ← probably the most relevant to you
Scene switching and returning?
How to load and change scenes