Pooling mesh

I would like to create a pool of 20 meshes each one composed of 4 vertices and I would like to use them to make a trail behind my character. I would like to avoid making new meshes each frames to limit the garbage collection growth that’s why I make a pool.

I struggle to position my meshes correctly. Indeed when I initiliase my pool a put a simple table of 0 for all my vertices coordinates and later I set vertex coordinates when I want to assemble the trail (whose shape changes at each frame). I think my problem comes from this spec “The origin will not be adjusted to the center of the mesh when modifying the mesh.”

Nvm I found the solution, my uvs coordinates were just wrong. Btw setting vertices at 0 and set them later is ok.

Nvm I found the solution, my uvs coordinates were just wrong. Btw setting vertices at 0 and set them later is ok.