I'm nearing completion of my online tanks game, and at the moment, the walls within the game are not textured. When a level loads, I do a CopyEntity of a master wall, then scale it to the size it's supposed to be. However, if I texture the master wall, any scaling does not alter the uv co-ords, so the texture will appear too stretched. How easy life would be if there was a parameter for ScaleEntity when, if set to true, would also scale the uv co-ords so that any texture applied would also get scaled up.
Of course, I can't just alter the texture, since this would affect every wall, no matter its size. The only way around this I can think of is to create a mesh for each wall, and programmatically set its uv co-ords depending on its size. A bit more of a hassle than copying primitives, but it should work.
Is this the only way? Or am I missing a simple solution to this?
Of course, I can't just alter the texture, since this would affect every wall, no matter its size. The only way around this I can think of is to create a mesh for each wall, and programmatically set its uv co-ords depending on its size. A bit more of a hassle than copying primitives, but it should work.
Is this the only way? Or am I missing a simple solution to this?