0
\$\begingroup\$

First off, excuse my ignorance. I am just getting started in game dev. and ran into a little issue. So I had these weird rippling-lines going across my screen, and saw in a couple forums that this means I don't have what is called a "pixel perfect" game. To fix this, I am supposed to change the pixels-per-unit of each sprite down to 1. Currently I had it on 32 because that is my sprite size and I am a complete noob.

Now, I change it down to one but it completely destroyed my game. Everything that is generated on my map/grid is sucked into the center in this giant orb of sprites (I procedurally generate my map off a grid of 1/0s). I am guessing there is just a setting or some such thing that I am missing. Any ideas?

Also would be happy with an alternative to remove the rippling lines.

\$\endgroup\$
3
  • \$\begingroup\$ No, changing pixels per unit to 1 will not fix that. This is a common superstition among Unity devs, and I'd argue changing your PPU to 1 can actually be harmful. What you need is to ensure your camera size is chosen so that the number of pixels on your screen/window is an integer multiple of the number of worldspace units your camera sees times your pixels per unit value. I have a few existing answers on this topic, mostly linked through this one which may help you build some intuition into what's happening here. \$\endgroup\$ Commented Aug 23, 2020 at 2:51
  • \$\begingroup\$ @DMGregory ...or you could just use the 2D pixel perfect package. \$\endgroup\$ Commented Aug 28, 2020 at 13:17
  • \$\begingroup\$ Which does what the answers describe, yes. \$\endgroup\$ Commented Aug 28, 2020 at 13:18

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.