|
|
|
|
Attention |
Topic was automatically imported from the old Question2Answer platform. |
|
Asked By |
vania23 |
basically, how do i make texture (sprite2d or other stuff) repeat the texture after scaling?
like, on scale(1,1) there will be 1 brick and on scale(2,1) there will be 2 bricks and so on.
|
|
|
|
Reply From: |
Tom Mertz |
Is there a reason you need to do it with scale? I think this is pretty easy to achieve if you set the image to import as repeating and then add enable the region. Then you can “scale” it by increasing the region_rect
’s w
and h
properties. See image below for a quick example, notice scale stays 1.
Godot 4
I just noticed you are using Godot 4. With Godot 4 you do not need to change the import settings for your image. Instead, on your sprite, you expand the CanvasItem’s Texture property and set Repeat to “Enabled” Everything with the region is still the same:
1 Like