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
https://playcanvas.com/editor/project/792094
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);
material.update();
whoa thanks so much.
I did’nt though it was going to be such easy
1 Like