Letterbox Animation for Cinematic Effect

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

Hi all!

I’m making a 2D game that has “in-engine” cinematics where instead of playing a pre rendered video or anything like that, I just take control of the Player Character in code to show some sort of story event. To indicate that this is happening I want to put a fake letterboxing effect on the screen, which I’ve done using some containers and texture rects. However, to add some ‘juice’ to the game, I’d like to show the letterboxing effect move in from off screen at the start of a cutscene. I am wondering what the best way to do this in Godot would be.

Thanks!

:bust_in_silhouette: Reply From: Calinou

You can use an AnimationPlayer node to move the ColorRects/TextureRects used as black bars. See Introduction to the animation features in the documentation for more information.

Create a “fade” animation that’s played when a cutscene starts to display the bars, then play it backwards at the end of the cutscene to hide the bars.

1 Like