[SOLVED] Change Tiling on runtime

Im trying to make a function to increase the size of a plain wich has a specific material, but when i try to modify the tiling of the material it doesnt change and gets stretched.

I’ve tried to edit plenty of tiling properties but that only changes the values not the appearence in game mode


Hi @Haldryn_C and welcome,

Your code is quite correct, the only thing you are missing is calling the material update method at the end:

var material = this.plane.model.material;
material.diffuseMapTiling.set(dif_tilling.x, dif_tilling.y);

whoa thanks so much.
I did’nt though it was going to be such easy

1 Like