Is it possible for Clip content follow Skewness property?

Godot Version

v4.2.2-stable

Question

Hey guys , im trying to make a player portrait in my game. the portrait is a panel with skewness. then i insert a texture rect to insert the player image inside it. by using a clip content it prevent the image from overflowing the border, but it become rectangle rather than follow the skewness of the panel. is there a right way to do this?

image

this is what the portrait looks like:

after using clip content it become rectangle on the panel properties :
image

Control.clip_contents only works with the control’s rectangle. You’ll need to use CanvasItem.clip_children instead and set it to Clip or Clip + Draw. If you want to maintain the border then you’ll need to add it inside the panel on top of your TextureRect and remove the background.

wow, i didnt know there is also clip children in CanvasItem. it works thanks a lot

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.