firstable i don’t know what is the best way to create a tiled level ( to construct a lievel using an image as tileset with multiple portions of parts or objects ), i was reading we have TiledPlane and Ground meshes,
however im confused the way i have to use, i managed to create many subdivisions in the plane, but how can i get every index of that mesh, we have something like row, cols variables?,
i think i have to add every portion of my image as texture in a different material and then set the material in desired cell index, but i can’t find the indexes.
any idea how to do it, examples, etc will be appreciated.
There are a few number of ways you could do that One would be to use one single plane for the entire area and manipulate the texture UVs to map a tileset. Another would be to use multiple instanced planes (one for each tile section) and set the texture using something like a node material and custom buffers. I remember a question that had a similar solution a while ago, but I can’t find the original topic…
However I created another example using the instanced planes approach: Tile ground with instances | Babylon.js Playground (babylonjs.com)
thanks for the link, i am reading about spriteMap, i have a texture packager and tileset creator that i am thinking how to modify to adapt to spriteMap an babylon config.
the issue i have implementing spriteMap y that i should have some solid tiles where i can use them to make collisions, but in that case i think i would use some kind of mesh collider.