Apply Texture to Polygon

I want to apply a texture to a 3D Polygon, but Babylon does not apply the texture correct(?) to my polygon.

Can anyone help?

https://playground.babylonjs.com/#QEH5S2

Thanks!

Shape for the polygon is always in XZ plane any given y values are set to 0.

From docs Irregular Polygons | Babylon.js Documentation

All vectors for shape and holes are Vector3 and should be in the xz plane, ie of the form BABYLON.Vector3(x, 0, z) and in counter clockwise order. You just list all the vertices of the polygon and CreatePolygon closes the shape.

3 Likes

Hey John! Thank you very much!

2 Likes