Tiling/repeating a Sprite2D that's animated using the "frame" property

Godot Version

4.2.0.stable.mono

Question

I have a Sprite2D that has a sprite sheet for a texture, it is animated by setting up the h_frames, and w_frames properties and then changing the frame property using an AnimationPlayer.

The problem I’m having is I want to tile/repeat this sprite. One common way of doing this is to edit the region properties to make the texture repeat over the size you need. Though this doesn’t seem to work when you have set up an animation in the fashion described above. The region settings seem to mess up the frame coords.

So the question I have is there a way to do this, something I’m missing?

Thanks

I’m not sure if it would work for your specific circumstances, but you could always use a Tilemap instead of a simple sprite 2d.

1 Like

Depending on what exactly you’re trying to achieve;

Like Yeah suggested, A Tilemap can do animations and obviously tile. Mostly for environment though.

If you’re just wanting to change the size of the sprite you could use scale (you’d need the texture to be scalable too).

Alternatively you could use an AnimatedSprite2D, it’s sprite frames allow for sprite sheet separation.