Hello there!
I have a mesh that I want to change texture depending on a event. The thing is Im using a atlas, so all 3 variations of this texture are stored in one unique texture. Can anyone explain to me how do I “move” uvs just so I change the texture ? Like we would do in 3dsmax but by script :\ I read this mesh.uv thing but didnt quite get it. sorry
The Mesh class has vertex and UV arrays - each element of the vertex array has a corresponding element in the UV array. The UV coordinates are values from 0 to 1 representing how far across and up the image the point is sampled from (ie, <0,0> is bottom-left, <1,1> is top-right). Moving UVs is a matter of knowing which coordinates correspond to which points on the image, but this can be quite complicated, depending on the structure of the mesh.