How to make a specific area of a sprite transparent?

Godot Version

4.2.2

Question

I am creating a wall with windows that will block the player, and the player will only be visible when passing through the windows. I intend to use a large sprite and “cut holes” in it to achieve this effect. Since this feature will be reused in many places, managing it on a large image with “holes” is more efficient than piecing together multiple images based on shapes.
1

Is this functionality achievable?

You can do this using gdshader, search “cut” in Godot Shaders website

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