See-through tileset shader
Asked Answered
R

3

0

Hi~ I'm currently working on a top-down game and I wanted the player to be able to pass behind the walls at the bottom of the screen. That's the easy part. The problem is that I also want the player to be able to see their character while they're behind said walls. I tried the simple solution: a transparent Light2D node in mask mode that can make the walls transparent at its pass. It works, of course, but not exactly how I intended. I wanted the mask to be circular, but I don't seem to find a way to do it in a traditional manner, as Godot 2D treats every light as basically squared. So I thought about shaders, but I'm not yet skilled enough in shaders to come with a solution by myself. How can I make a shader that allows me to see through 2D tilesets?

Rabblement answered 15/12, 2021 at 11:0 Comment(0)
S
0

A light mask didn't work? Set light to mask mode and provide a mask if you haven't tried yet.

Stomach answered 15/12, 2021 at 14:7 Comment(0)
R
0

@Megalomaniak said: A light mask didn't work? Set light to mask mode and provide a mask if you haven't tried yet.

I tried that, but the mask is always squared, I can't figure out how to make it a circle.

Rabblement answered 21/12, 2021 at 10:21 Comment(0)
S
0

You'd make it a circle by giving it a mask with the drawing of a circle in it, no?

Stomach answered 21/12, 2021 at 13:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.