- Home /
Texture Coordinates
Hi everyone! I am trying to make a puzzle piece game using C# but the one thing I need to do is figure out how to texture a piece of the picture onto a piece of the puzzle. If anyone can help me with that or at least point me in the right direction I would be ever grateful!
Look up UV mapping. (2D texture coordinates are generally referred to as (u,v), in which both u and v lie between 0.0 and 1.0.
I know you've marked this question as answered, but you should think more about uv mapping. For what you are doing, you can give all your puzzle pieces the same material with the whole texture and then set the 'mainTextureOffset' and the 'mainTextureScale' in code to map different parts of the whole onto each piece.
A better solution (fewer draw calls), would be to set the uvs in mesh ins$$anonymous$$d of modifying the material.
Your answer

Follow this Question
Related Questions
How to get texture coordinates without using MeshCollider? 0 Answers
Assigning UV Map to model at runtime 0 Answers
Texture uv's offest in distance? 0 Answers
Overlay text over multiple cubes 1 Answer