Hi,I’m develop 2D pixel game in unity. everything works well before I change the sprite filter mode to point and add 2d Pixel perfect package. Now I have weird problem with cinemachine follow ability and it doesn’t work properly.It shacked around The player When player stop moving. I read a lot of article but nothing changed. Also use RoundCameraPos script from @Gregoryl . 2d pixel perfect 1.0.1 and cinemachine 2.2.8.
4rvpo
Nobody has any idea about my probkem? Please help me.
@Adam_Myhill
@Gregoryl
It looks as though the camera is correctly snapping to pixel boundaries.
This is correct if a “pixel” in your video really corresponds to an actual pixel on the target device. However, if you’re targeting devices with a higher resolution but want to emulate a low-res look (like you’re doing in the video), you might want to give the camera more positional resolution. Is that what you want to do?
G
Hi, Thanks for your replay. Yes I want to use low-res sprite(16x16) in higher resolution. for that I add pixel perfect camera to my Main Camera and set the setting. but after that there was problem with cinemachine follow ability and the smoothness completely disappeared from it. I use your RoundCameraPos and it doesn’t help.I changed Vsync and Anti aliasing on and off but nothing changed. I use ray casting for player movement instead unity physics.
Maybe you shouldn’t be using the RoundCameraPos script, as that is forcing the camera to remain on (big) pixel boundaries, which is what the camera is doing. You want the camera to go between those pixels.
I’m not using that script on cinemachine in the captured video that i posted above. The problem is whether I use it or not use it the problem exist. I think it may be because of the damping factor .cinemachine couldn’t calculate lookahead algorithm correctly. with zero damping the camera shake will disappear and it cause a bigger problem. In that setting camera movement cause a vertigo and I couldn’t play it.
If in fact your actual screen resolution is greater than the visible pixel resolution (that you have for stylistic effect), then there is no reason that Cinemachine damping would prevent the camera from positioning itself on subpixels. Do you have some other script that’s forcing the camera to remain on big pixel boundaries?
Just cinemachine confine with confine mode 2d. cinemachine brain update mode is smart. I also try fixed and late update.
Can you put together a small lightweight test project that shows this problem and PM it to me?
Yes, I’ll start now.