How can I turn the screen black with an input

Hi, I want to create following fucntion: When you press the Input (R) the screen should turn black and the transition should look like the player closes his eyes. When you release it, the screen should turn normal and the same eye-close transition should play again, but this tim reverse. How can I do that?
My UE Version is 5.1.1

You can use widget for that, it has built in animation graph.

1 Like

add a border to your canvas


Set A under Brush Color to Zero and make sure to Change the Brush Color to Black
75b02eba65f63b5a6256b55ed3a21399

Now click Animation


Add Animation and Name It
bd5ef58278423c856ffc8b9c5ce2109e
Click on the Animation You Named and Track said Border (Not the Canvas Slot)
ceb084697e3f38849a3e1b99cfff993d
Click the Plus Sign
134ecdf1fa3a99ea7983e3b01c6320e5
Content Color and Opacity
Set the A to 1 on any Timestamp
Untitled
Then Reference in your Player Character