Hello Guest

Author Topic: Random gaps between aligned sprites  (Read 3589 times)

SirJson

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Random gaps between aligned sprites
« on: December 15, 2013, 07:24:03 pm »
Hi,

When I align two or more sprites and then move the ingame camera around I can see sometimes gaps between my sprites. I aligned my sprites with vertex snapping.

When everything is fine it looks like this:


But in the next frame it looks like this:


I already tried the following things:

Unfortunately I have absolutely no idea what is causing these problems... is someone out there who knows how I can fix this?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Random gaps between aligned sprites
« Reply #1 on: December 15, 2013, 07:50:53 pm »
1. Are you using a perspective camera?
2. Are you absolutely sure the are perfectly aligned? Zoom in really really close to check - I've seen vertex alignment not actually perfectly align things in the past.

SirJson

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Random gaps between aligned sprites
« Reply #2 on: December 15, 2013, 08:17:12 pm »
Thank you for your quick reply! I didn't check the most obvious reason for that problem. :) There are indeed real gaps between the sprites...

Is there a better method to align sprites? Vertex snapping seems to be too unreliable.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Random gaps between aligned sprites
« Reply #3 on: December 15, 2013, 08:35:48 pm »
I usually just a little editor script to do this... a little menu item with a shortcut usually works pretty well - you will want to snap to a grid, or texelSize (sprite.CurrentSprite.texelSize).