How to repeat from a set of textures?

Godot Version


I know how to take a single texture and repeat it over and x,y space. But I’m making a 2D Platformer. I have lots of ground. I have upwards of 5 different “tiles” for ground. Is there a way to have one Sprite2D that is stretched over an x,y space, and repeats randomly from one of my 5 different ground tiles?

Example of boring, bad texture repetition: Screenshot by Lightshot
My goal: Screenshot by Lightshot

Any reason why you want to use a Sprite2D instead of a TileMap for this? :thinking:

1 Like

Not at all. I’m brand new. Just following guides on Google which pointed me towards Sprite2D. I’ll go look into TileMap. Thanks!