When I insert an image into the 2D sprite, it looks distorted. The size of the image is 500 x 765. How can I make the 2D sprite look exactly the same as the image that I inserted?
For an example:
The one on the left is how its suppose to look like. The one on the right (with the blue background) is smaller and distorted, which I took a snippet of the screen while its in play mode.
Haven’t checked it myself, but sounds like it’s padded to the closest, higher powers ot two (which in this case are 512x1024). This is common in some engines to happen automatically for efficiency reasons, and some hardware may force it (GPUs that doesn’t support NPOT textures).
- Paste your sprite image to an empty texture with power of two sizes, ideally square. As I said in this case it would be 512x1024, but may be higher. POTs are 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096…
- Import it to Unity as an sprite. Set the “number of sprites” from “single” to “multiple”.
- Open the sprite editor, and ask Unity to slice the texture into sub-sprites. You should see a rectangle englosing tightly your sprite inside the texture. Click on it if you want to change its name, its pivot…
- Use that newly created sprite for your zombie.
Setting the compression format of your sprite to true color or 16 bit may solve the problem.