How to set up pixel perfect camera with cinemachine in Unity

  Рет қаралды 17,128

NBurg

NBurg

4 жыл бұрын

Quick demonstration on how to get the pixelperfect camera working with cinemachine in Unity.

Пікірлер: 46
@capsey_
@capsey_ 3 жыл бұрын
Let's just appreciate that great person that told us everything we need in one 4 minutes vid with an explanation included
@SuperMatthew345
@SuperMatthew345 3 жыл бұрын
I was about to pull my hair out trying to find the solution. I had everything setup except my Update Method wasn't set properly. That did the trick, thank you so much!
@IzzyLockhardt
@IzzyLockhardt Жыл бұрын
THANK YOU. My character was bugging out and setting the Update Method and Blend Update Method fixed this issue. I could not figure it out for the life of me. You saved me hours of googling. Appreciate you!
@csondika
@csondika 2 жыл бұрын
I had a really serious scaling problem. I tried some script magic that worked at some point but didn't solve the issue. Adding the Cinemachine Pixel Perfect extension solved everything like a charm, I can even delete the code that I wrote earlier. Great!
@SerpentineStudios.
@SerpentineStudios. 2 жыл бұрын
Great video, solved the issue I was having. Ty man!
@Zavarzinia
@Zavarzinia 3 жыл бұрын
Thank you for your work!
@DevBarns
@DevBarns 3 жыл бұрын
You are an absolute legend
@davidmcdermott2580
@davidmcdermott2580 3 жыл бұрын
Awesome video!
@logout3967
@logout3967 3 жыл бұрын
You're a life saver!
@xCookys
@xCookys Жыл бұрын
thanks!! 3:21 was exactly what I was looking for!
@TheComposerAX
@TheComposerAX 3 жыл бұрын
Hello and thanks for the tutorial! I think my camera works now but my character is not "snapping" on the pixels. How did you achieve this pixel perfect movement?
@thesnazzyitalian1154
@thesnazzyitalian1154 3 жыл бұрын
Hey, you mentioned that you were able to fix the issue of the Camera Confinement not working. How did you manage to fix it? I haven't had any luck figuring that out.
@JonelKingas
@JonelKingas 20 күн бұрын
something changed probably in those 4 years, I did everything same, only pixel perfect camera changed there are some options missing, but its not smooth... and its jiterry
@CaptJazz869
@CaptJazz869 2 жыл бұрын
Is the pixel perfect extension supposed to manually set the camera orthographic size? I have the components set up as you have laid out in this video, but if I manually change the camera size to say 4, it doesn't automatically change to the right size (for a 640x360 game it should be 11.25) when I run my game. Any idea what's going on?
@Edenal0n
@Edenal0n 3 жыл бұрын
Thank you so much!
@CactusbIah
@CactusbIah 3 жыл бұрын
Finally worked after I set the Cinemachine virtual camera Orthographic size to 0.
@zedpenguin
@zedpenguin 2 жыл бұрын
this worked for me too
@christophergraf5929
@christophergraf5929 3 жыл бұрын
Hey! This was very helpful. I am, however, having some trouble with the Confiner. I made an empty object and used a Polygon Collider 2D to surround the room, so the camera would not go outside. When I go to run it the player is forced OUTSIDE of the collider because they have a collider and Rigidbody2D themselves. How did you work around this? Did I set up the collider wrong? Is it a layering issue? Thanks so much for your help!
@febrianerwin3728
@febrianerwin3728 3 жыл бұрын
dont forget to check the isTrigger in the polygon collider 2d
@linzenmeyer
@linzenmeyer 2 жыл бұрын
Watching this on my phone and I couldn't see the "issue" lol.... I'll take your word for it.... question tho....are you having the issue even tho you've set your sprites to point? or is this a "camera fix" if they are some/all set to bilinear? or another issue it fixes altogether?
@lewismailey3110
@lewismailey3110 3 жыл бұрын
Thank you!
@chris.davidoff
@chris.davidoff 3 жыл бұрын
THANK YOU!!
@cobycurtis5209
@cobycurtis5209 Жыл бұрын
If it doesn't work for you. Turn the main camera size to 0. Then when you press play, the main camera will update to whatever the size you set on the CM vcam1 camera. Hope that helps.
@SilencerXVIII
@SilencerXVIII 3 жыл бұрын
Thank you for adding the 'late update' setting. That is not in the documentation!!!
@Xeexist
@Xeexist 4 жыл бұрын
How do I control the orthographic scale of the cinemachine? Seems like pixel perfect camera's resolution takes precedence of the scale. You can see the difference when you click play at 0:10 and at 2:16 where the camera now zooms in
@nick78698
@nick78698 4 жыл бұрын
Cinemachine sets the orthographic scale based on the reference resolution and ppu. There is also a bug in the cinemachine brain. You need to use unity 2020. And install cinemachine 2.6.0 preview 5. They fixed that cinemachine brain now works with pixel perfect in fixed update. If you change the orthographic scale yourself it wouldn't be pixelperfect anymore 😉
@youkergav
@youkergav 3 жыл бұрын
Is there any way we can get the source code of this project? I'm having a lot of issues with jitter still which I think is related to movement. I'd like to see someone's implementation. I've been stuck on this issue for weeks..
@magic00squirrel
@magic00squirrel 3 жыл бұрын
Same here, I've been pulling my hair out over this and it feels like I've tried every solution under the sun. Source code would be nice.
@devoxdevelopment566
@devoxdevelopment566 2 жыл бұрын
is there any solution in the mean time?
@brg1646
@brg1646 2 жыл бұрын
When I add CinemachineBrain everything disappears in the camera view window? It can't see the tiles it seems.
@JG-kb5nv
@JG-kb5nv 2 жыл бұрын
THANK YOU I LOVE YOU
@AhmadZaydan195
@AhmadZaydan195 3 жыл бұрын
I already change the update method but it still doesn't work
@thereisnousernameleft
@thereisnousernameleft 4 жыл бұрын
Thanks for your video. However the pixel perfect setting will not work for me in Unity 2019.3.13f1 with URP (URP has an included PP Camera which is not compatible with the 2D PP pack). The URP included PP does not work for me at all trying with cinemachine or even in an blank project. Do you have any suggestion for that? :)
@luisroca835
@luisroca835 4 жыл бұрын
Hi Sam, I hope you found the answer. I am also having the same problems, I am using URP and the solution of the video does not apply. I hope to hear from you! or Nick if he had the answer
@thereisnousernameleft
@thereisnousernameleft 4 жыл бұрын
@@luisroca835 Hey Luis, I've updated to 2019.4, i had to >reasign< the 2D renderer in the game settings and camera. (did uninstall cinemachine and PP before). Then I set URP again with an 2D renderer. 1.) set the 2D renderer in the game settings and camera settings. 2.) set Pixel Perfect Camera (experimental - comes with URP) in the camera and set it up. 3.) be sure that your URP uses the 2D Renderer, not the standard URP settings 4.) After that install the package for cinemachine. That way it worked for me. I hope that helps you. If you still got issues, you can message me on twitter: @s4m_ur4i
@luisroca835
@luisroca835 4 жыл бұрын
@@thereisnousernameleft I will try your recommendation. I am so glad for your quick response, Thanks!. I will download the latest 2019.4 version (actually I had de 2019.4.2, I hope 2009.4.3 makes the difference). Then I will try to follow your steps. Btw, beautiful pixel art on your web page and twitter, I am already following you, for sure I will contact you!
@SnowPeaGames
@SnowPeaGames 2 жыл бұрын
This fixes everything to an insane degree. Anyone following this now should follow this advice, it's like night and day. Thanks so much!
@user-hs4lw9zt1j
@user-hs4lw9zt1j Ай бұрын
How do you make the game take up the entire screen? thx
@carlos_7x
@carlos_7x 5 ай бұрын
Thanks for the video. Now I'm having issues using Canvas, since everything is shaking. This effect is only happening if I use Pixel Perfect Camera - without it, it works perfect. Anyone having this issue?
@SaadTheGlad
@SaadTheGlad 3 жыл бұрын
I’m gonna text this and if it works I’m gonna subscribe
@hiiambarney4489
@hiiambarney4489 4 жыл бұрын
With the amount of Retro Games going around I'm kinda disgusted by the fact that this hasn't been a built in feature for years now.
@nonsuspicious
@nonsuspicious 3 жыл бұрын
It is now.
@durrium
@durrium 2 жыл бұрын
This turned it WORSE for me haha... how can this be??? If anyone has any tips regarding this, please help
@durrium
@durrium 2 жыл бұрын
Update! Reseting the camera and the cinemachine camera and followng you tips did it. However, the Orthographic size needed to be adjusted to 2.6 otherwise i got some serious issues. Try playing around with the Orthographic size in the cinemachine and see if it works for you :)
@tankycatcool63
@tankycatcool63 Жыл бұрын
ir squashing my images
@nick78698
@nick78698 2 жыл бұрын
Hey folks. Thanks for liking my video! I appreciate it! During the corona lockdown I had a lot of free time to do some fun stuff in unity. Since then I've moved on to more important real life stuff😉. I haven't looked at unity for over a year so I cannot say if this still works. I can imagine that the authors of pixelperfect and cinemachine have found a better way to make this work? I remember back then that cinemachine would get an update like every other week? Let's appreciate the work they put in to their 'free' code 😁. That being said. I still get a lot of notifications on this subject so I think it's time to share the source code. github.com/nburgmeijer/ZeldaLike. A big shout out to 'mister Taft creates' who started doing tutorials on this Zelda like game! I was just building on to his base to make it even better and comply to real world c# conventions(as probably seen in the source code). Go join his discord channel! discord.gg/3SQBUn5
🖽 Всё про Tilemaps в Unity 3D
20:32
Emerald Powder
Рет қаралды 217 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 697 М.
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 60 МЛН
Mom's Unique Approach to Teaching Kids Hygiene #shorts
00:16
Fabiosa Stories
Рет қаралды 33 МЛН
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 12 МЛН
Achieve Pixel Perfect Art in Unity
4:40
NotSlot
Рет қаралды 25 М.
How to ACTUALLY get into Gamedev
14:01
DaFluffyPotato
Рет қаралды 706 М.
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 519 М.
Pixel Art Tips from a Professional Artist - Tips & Tricks
8:01
Goodgis
Рет қаралды 1,1 МЛН
Cinemachine Is Really Powerful, Set It Up EASILY
7:26
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4 МЛН
I Made a 1D Game 🎮
11:18
Mashpoe
Рет қаралды 1,7 МЛН
3 Months of Learning Game Development
10:48
Byte of Michael
Рет қаралды 938 М.
I Wish I Had Known This Before I Started Unity Game Development...
11:11
How I learned Unity without following tutorials (Developing 1)
18:11
Game Maker's Toolkit
Рет қаралды 2 МЛН
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 60 МЛН