when Animation run

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

Hello, how does an animation run at a certain time? For example, when the character approaches the door, the door opens

:bust_in_silhouette: Reply From: exuin

You should put an Area2D on the door. Connect the body_entered signal to whatever plays that door animation, and if the player is the body, then play the door animation.