Different polygons with same texture dimensions and position

how can i apply a texture to different meshes build with PolygonMeshBuilder, so every texture has the same size and position?

i made an example of what i mean

When viewing the example from the top, so all 3 meshes are behind each other, i want the textures to align with each other

Hi Cramer

You can get away with using 3 materials all with a different uOffset/uScale value on the texture.

You can play with https://www.babylonjs-playground.com/#PTTMVI#140

Lines 14,20.21,25,26

Thanks for the answer.
I messed around with your solution and found that i can actually customize the UV coordinates of the polygon, so that’s what i’m using now.

1 Like