0 votes

I have a Sprite and I want that only a part of this Sprite is visible. How can I do that?

If this goes better with a TextureRect, I can use a TextureRect insted of a Sprite, too.

in Engine by (369 points)

1 Answer

+1 vote
Best answer

Select the Sprite-node in the scene-tree, expand the "Region"-section in the inspector, set "Enabled" and then define the rectangle you want to be visible: x and y define the top-left corner of what will be visible, w and h are the width and height.

by (10,469 points)
selected by
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 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 webmaster@godotengine.org with your username.