Demo Pixel Perfect Camera With Zoom Controls in Unity

preview_player
Показать описание
There's a lot of shenanigans when it comes to working with pixel perfect display of sprites in Unity, especially when you're rolling your own perfect pixel solution.

This script avoids displaying irregularly rectangular pixels at varying zoom levels.

The upper left hearts are at 32 ppi. The upper right are at 64 ppi and the botom hearts are at 128ppi.

- Automatically adjusts to screen height even after changing the display size.

- Sets an appropriate scale on the camera based on a desired level of zoom.

- Comes with zoom controls.

- Optional smooth zooming between zoom levels over a duration.

Source Available:
Рекомендации по теме
Комментарии
Автор

Hi, first, thanks a lot for making this, it's really useful.
Second, I have a question. Is there a way to disable the scroll zoom? I want to just control the zoom in my scripts and keep the player from having direct control of it.

morningdirge
Автор

Does it work together with Cinemachine (Pixel Perfect Extension) ?

benjamingerd
Автор

would it be possible to allow for zooming out aswell ?

foamtoaster
Автор

This is an incredible feature. It totally replaced the Unity package manager Pixel Perfect component that I was using. Thank you for writing this code! It is extremely easy to use and it works great!

SocietyEnjoyer