0
\$\begingroup\$

There are many PixelPerfect component that exists and it confuses me. The CM PixelPerfect component doesn't work in my 2D Tilebased game. enter image description here

So I use the Camera component named "Pixel Perfect Camera (Experimental)". enter image description here

I feel that the right PixelPerfect component because it seems that it's the only one working for my project ahah. (note : I'm aware there's another PixelPerfect component in the "2D pixel perfect" package, but it's only compatible with LWRP projects if I'm right.)

The camera : enter image description here

The hierarchy : enter image description here

CM vcam1 and CM vcam2 are used to make transitions between Areas.

Now, I need to make a zoom on the player. To achieve that, I have added a 3rd "CM vcamZOOM".

But nope, it's not working at all. I mean, everything else works, the rotation, etc, everything but the zoom. Even if it's the only vcam enabled, it's not zooming. I found out that disabling the "Pixel Perfect Camera (Experimental)" component on the Camera solved the problem. That's not a real solution since I need to use a PixelPerfect component (with the ability to Zoom).

Am I using the right PixelPerfect component for my needs? Is this a compatibility bug between URP camera pixelperfect component and CM zoom ? Thanks for reading and for your answers.

\$\endgroup\$
4
  • \$\begingroup\$ If you smoothly zoom in on pixel art, it's no longer pixel perfect. You're asking for two things that contradict one another. \$\endgroup\$
    – DMGregory
    Aug 22, 2020 at 16:23
  • \$\begingroup\$ @DMGregory Are you implicitly suggesting me that I should deactivate my pixelperfect component when I want to perform a zoom? \$\endgroup\$
    – Sharpnel
    Aug 22, 2020 at 16:26
  • \$\begingroup\$ @DMGregory I mean, that's what I had in mind. The fact that the CM pixelperfect component still remains active during a zoom confuses me. But anyway, I already tried to deactivate the URP pixelperfect right before I perform a zoom. The problem is "when do I activate it back"? At the end of the blend? But what if there's another blend that occures before it? It seems pretty messy, I mean, it's totally doable, but why didn't I find anything on this subject. Zooming in 2d tiles game seems pretty common. Do you have any lead for me, ô great Douglas the demi-god. aka root of knowledge (^_^) \$\endgroup\$
    – Sharpnel
    Aug 22, 2020 at 16:55
  • \$\begingroup\$ I was activating/deactivating Vcam to chose which Vcam I wanted to make a transition, even with no PixelPerfect component, the zoom was a bit jerky. After many many things tried, I am now using a Cinemachine StateDrivenCamera, which is really simple and super cool. The transitions are very smooth. But still, my problem persists. The Cinemachine pixelperfect component doesn't work and the URP pixelperfect component prevent any zoom to be applied. Because this component needs a Reference Resolution, switching it On and Off makes the screen stretched a little bit. Enough to be seen and it's awful \$\endgroup\$
    – Sharpnel
    Aug 22, 2020 at 18:41

1 Answer 1

0
\$\begingroup\$

And voilà. I had to use BOTH pixelPerfect components :

On my Camera : URP-pixelPerfect (experimental)

On my VCams : Cinemachine-pixelPerfect

Answer is here

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .