[Solved] Texture material gets cut when altering offset on Opacity Blend Type Alpha


I’m trying to animate a texture on a plane using diffuseMapOffset, but it gets cut. Apparently it seems like it gets cut by the first texture shown. It shows correctly if I set the Blend Type to None, but of course it shows everything. Any help?


Hi. You need to set offset for opacityMapOffset as well.
Each map has individual Map Offsets. It is just UI allows you to combine them for ease of use.

And in update, you could have something like:

var ind = Math.floor(Date.now() / 200) % 18;
if (ind !== this.lastInd) {
    this.lastInd = ind;
    material.diffuseMapOffset.x = (ind % 5) / 5;
    material.diffuseMapOffset.y = (ind - Math.floor(ind / 5)) / 4;

Instead of having timer code.

Oh, fast reply. Works like a charm, thanks! I didn’t know that. :heart_eyes:
And thanks for doing the favor iterating the texture, I was just doing a quick check for the texture animation. :smile: