[SOLVED] Change Texture Offset for Individual entity with same material

Hi,how can i change each render’s material offset Individualy?

I have these 2 Conveyor and i want to change its texture offset for simulate its movment to right or left
but after several try i cant do anything

not work:

  this.entity.render.meshInstances[0].setParameter('texture_diffuseMapTransform', new pc.Vec4(this.i, 0, 0, 0));

not work too:

 this.entity.render.material.diffuseMapOffset = new pc.Vec2(i++,0);
 this.entity.render.material.update();

Hi @mrb71,

Check this post on what are the latest shader uniforms to use with setParameter (and make sure to pass an array):

1 Like

It’s Solved .Thanks @Leonidas

1 Like