Show just a cutoff of a TextureRect or Sprite

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Godot_Starter

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.

:bust_in_silhouette: Reply From: njamster

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.