Prevent scaling for panning material

I saw this post but still could not get it to work:

How do I prevent the texture from scaling (regardless of size/scale and in all axis) when it pan’s?

Hi!

You can use the method from your link. But this method works for the same meshes with a proportional scale. I added the parameters of scale to compensate for scaling for different meshes.

Two boxes is the same mesh with different scale. Floor is another mesh with additional scaling to align the texture size.

90904-scale04.gif

So I basically have to create a material instance for EVERY mesh/BSP that has a different proportional scale and change those 2 parameters?

Also it doesn’t work on plane-meshes (at all). It still scales and seems to ignore the new code all together. But it works for cubes. Why do materials behave different on planes?

This Plane mesh I took from the Starter Content.

For reversing direction of panner you need to set negative value to Scale parameter.

U Scale = 0.1

V Scale = 0.1

90910-scale_new02.gif

U Scale = -0.1

V Scale = -0.1

90921-scale_new03.gif

Here you can see that it works for the BSP but not for the mesh-plane:

Both have the same scale and use the same material. Yet the plane does not work. How is that possible? I also tried negative values or dividing by 1 / scale but nothing works. The planes are always like that.

Note that I imported my own plane from Blender and did not use the one from UE4 itself because this project does not have the starter content included.

I did more tests with imported planes. It seems that they all bug out even when I set their scale to 1:1:1 (no scale). This only applies to materials that take scaling into account (like we did above).

Is there some known bug regarding planes and non-scaling materials?

I found the problem. The UV’s are missing in the plane-model…