#Transition effect

1 messages · Page 1 of 1 (latest)

plain prism
#

I want to have an effect when my player dies. You know those transition things, where a black area closes in on the centre of the screen in a circle shape? I'm not sure how to do this.

indigo silo
plucky pecan
#

make sure there is an animation player somewhere in the scene tree, whether that be in a ui node above the rest of the level, or in an autoload node, and then create a fade in, or circle enclosure animation inside it (for what you're seeking, I would suggest finding a png of a flat image with a transparent circle in the center), and then animate the properties of those sprites (as ui texture images) to get the animation you want done

then when the player dies, call a signal that is able to be connected to the ui node, or other node that is able to contact the animation player to tell it to play the fade animation (make sure to use the await function too in order to make a coroutine for reloading the level/player after the animation is completed, then replay the animation, except reversed, when the await is completed and the player is reloaded)