Local Y height to set alpha fade over height

Hi, I’m new to shader graphs, I’ve been watching a few tutorials and trying to give it a go but not getting far :frowning:

I’d like to make a teleport portal, where the alpha fades over the y height. This needs to be the local y height because the portals will be in different world positions and rotations. I have it working for the world y positions but I can’t figure out how to get local. I tried subtracting the object position from the world position but this also didn’t work.

Can anyone help me out with this? Attached image of the shader graph using the world position, but as you can see on the image only the top portal on the first cube has the wanted effect.


8511158--1134146--Shader1Results.PNG

I managed to get the results I wanted by just lerping the UV, but I don’t think this is the right way to do it? I don’t think this will work on more complex models?