All Questions

Community

A
Ray Alez

How can I fix the clipping if I want to use TextureRect instead of Sprite?

I want to create an outline around the objects that are within the TextureRect (I'm using it instead of Sprite because I need my textures to scale automatically to a specific size).

There's no "Region" property on TextureRect. Is there some other workaround?

  • Razoric replied

    You could manually calculate the region data and pass it along to the shader when you set the texture, to use it as UVs. Or you use a Control instead of TextureRect, and use the built in _draw function to draw the sprite.