0 votes

Hi,

I was wondering if there is a way to scale a sprite, but instead of it stretching and loosing it's shape, it repeats. It would be handy for a ladder sprite for example.

Thanks.

Godot version 3.4.4
in Engine by (78 points)

2 Answers

0 votes

You need to reimport your image and enable the "repeat". Then in the Sprite node, switch the enabled under the region to on. Set the w (width) and h (height) to the value you want. So for the ladder, you need to set the w to the width of your ladder and set the h to the height you want to reach.

by (334 points)

Thanks, not much info anywhere on it. The node inspector options is what I was missing :)

0 votes

In the import tab of the image you want to tile, set Repeat (which is under the Flags section) to Enabled.

Now after adding your image to a sprite node, go to region, tick enable, and now you can play around with the Rect settings to tile your image.

by (14 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.