Hello Guest

Author Topic: How to make a sprite pixel pefect  (Read 3325 times)

mr_malee

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
How to make a sprite pixel pefect
« on: September 26, 2013, 08:44:00 pm »
so I've searched around the forums, read the docs but nothing I try seems to make my sprite pixel perfect.
I'm sure it's got something to do with my sprite collection and camera setup, but I don't know what settings I need to make it work.

currently I've got my sprite collection set to: 1 pixel per meter.

my camera: orthographic, 1 pixel per meter, fit visible scale.

I would like most of my sprites to auto scale except 1, which I would like pixel perfect.
using LateUpdate and calling: MakePixelPerfect() on the sprite does nothing.
Tracing out some values in that function, the "s" value is always 1.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to make a sprite pixel pefect
« Reply #1 on: September 27, 2013, 10:04:55 am »
Make pixel perfect makes it pixel perfect relative to the native resolution. If you'd like some sprites to scale and some not to, the easiest way I can think of is to use 2 cameras, one with overrides and another with just one pixel perfect override, using Unity layers to filter stuff into the correct cameras. Will that work for you?