Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Sprite Renderer Issues - SpriteMode: Multiple

Discussion in '2D' started by Carlos_7x, Apr 10, 2017.

  1. Carlos_7x

    Carlos_7x

    Joined:
    Jan 19, 2017
    Posts:
    14
    Hi people,
    I'm having a trouble with displaying a sprite with SpriteRenderer, having SpriteMode: Multiple.

    This is my sprite:
    met.png

    It is divided by 32x32 pixels into 8 images.
    The thing is that it is rendering my enemy with lines above it:
    4-10-2017 7-01-39 AM.png

    As you can see, this frame belongs to the 5th frame in my enemy spreedsheet (first of the second row), and having the size of the frames as 32x32, it is somehow, taking a little bit of the frame above (1st of the image).

    Is this an Unity known issue? I guess I can fix it by mocking a little bit the image, but I wanted to know if this is something already reported, or if there is a setting I have wrong.

    Thanks!
     
  2. webox

    webox

    Joined:
    Aug 27, 2015
    Posts:
    72
    How are you slicing the image? could it be that you're slicing 32 lines starting from 0 to 31, thus you're missing the last line from the top sprite and adding it to bottom one?
     
  3. Carlos_7x

    Carlos_7x

    Joined:
    Jan 19, 2017
    Posts:
    14
    I don't think that's the problem, but I will take a look in the night when I come home.
    Thanks!
     
  4. Zephus

    Zephus

    Joined:
    May 25, 2015
    Posts:
    356
    Try going to the Quality Settings and disable Anti-Aliasing and Anisotropic Textures. These cause glitches such as that one with pixel art.
     
    webox likes this.
  5. Carlos_7x

    Carlos_7x

    Joined:
    Jan 19, 2017
    Posts:
    14
    Hey, that was the solution, it is working correctly, thanks!.