How to shift WorldAlignedTexture in Z direction?

I’m having a very hard time with a world-aligned texture. I have the scale correct, but I am trying to basically shift it down in Z space.

Plugging literally anything into the WorldPosition(V3) node seems to break it - and plugging the AbsoluteWorldPosition Node into the WorldPosition(v3) doesn’t do anything…

I have the material all set up - I just need to offset the world aligned texture in the Z direction - can’t for the life of me figure it out. Please help!

the WorldPosition(v3) takes in the world position of each pixel so that the function can turn that in to a world-aligned texture.
I’ll explain why what you’ve tried isnt working:
-plugging in a static number to that input would break it, as you’re telling the function that each pixel on the screen is exactly the same.
-plugging in the AbsoluteWorldPosition would do nothing, as that’s what the input already takes as default, so you’re overriding it with the same thing.

You’re half-way there though!

All you need to do is get that AbsoluteWorldPosition node and *add or subtract to it the amount you want to shift the texture.
in your case, if you want to shift your texture down in the z-axis, Because the coordinates are stored as X,Y,Z, you need to subtract '0,0,
’ from AbsoluteWorldPosition. In this image, I’m shifting the texture down by 1 meter:

Hope that helps :slight_smile:

3 Likes

You dont need to add that absoluteworldposition, thats already in the material function and you are adding that V3 to it.
so its a bit redundant.

or use: Material Function - World Aligned Texture/Normal With offset & Rotation. - Community Content, Tools and Tutorials - Unreal Engine Forums :slight_smile:

1 Like