Looping animated sprite to fill whole camera resolution

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

So i have a animated sprite of rain, in a 2d game, which is 16x16 in size. The AnimatedSprite is added to a canvas layer and put in front of everything else to simulate rain without the need for particles.

Now instead of filling the whole world of rain, i want to instance the rain animation depending on the size of the camera that follows the player.

The Camera’s size is static, and always follows the player, so i am guessing i have to get the camera’s size (x and y), and attach each instance of the rain animation to the camera so it follows it?

Any hints or tips on this?