Hi What resolution of rink you had? My rink is cropping on top and bottom My resolution is 1242x2208 (WxH)
@brayanlucca74373 жыл бұрын
I dont mean to be so offtopic but does anyone know a trick to get back into an instagram account?? I was stupid forgot the password. I appreciate any tips you can give me.
@axelaldo43633 жыл бұрын
@Brayan Lucca instablaster ;)
@brayanlucca74373 жыл бұрын
@Axel Aldo i really appreciate your reply. I found the site on google and I'm in the hacking process now. Seems to take a while so I will reply here later with my results.
@tikebkaatar4 жыл бұрын
Thank you, this is the first video that actually addresses the problem and most scenarios to do with aspect ratio
@willh694 жыл бұрын
I'm pretty new to C# coding, super grateful that we have resources like this for free on the internet. It all seems so complicated but when you break it down logically like this it all makes sense Thanks Press Start
@christianschuster41715 жыл бұрын
Fantastic! This is the best explanation I’ve seen so far. The examples help a lot. Thank you for putting in the effort!
@fenix37524 жыл бұрын
What is the rink?
@DracoGrim4 жыл бұрын
@@fenix3752 RInk is the image/sprite he uses, which is a hockey field (ring/rink)
@fenix37524 жыл бұрын
@@DracoGrim thanks man
@mivuh2 жыл бұрын
That was by far the most efficient way to solve my problem with my first game. That was the last part i was missing, thank you so much.
@thesolitaryowl3 жыл бұрын
Wow. This is the first video that actually explains this problem really well. I've been searching for an hour trying to solve this issue.
@alexlik4197 Жыл бұрын
Thank you so much! You have no idea how long I've been looking for something like this! Even though this video is 4 years old at this point, it helped me a ton!
@Aereton2 жыл бұрын
You've helped me understand how camera sizes and screen resolutions work together. Thank you so much, great video short and concise!
@javierfernandez60302 жыл бұрын
This is the best explanation I've found so far.. crazy it was made 4 years ago! Thanks a lot!
@mitul12943 жыл бұрын
Thank you for explaining one of the major and common problem in such a simplistic manner
@jakubneska16943 жыл бұрын
Thanks a lot! I struggled for a while trying to find something explaining how orthographic size relates to objects positioning! And your video explained everything perfectly! Couldn't do minimap for my game without it!
@skiesquiggles73195 жыл бұрын
Literally exactly what I needed, many thanks to you, friend!
@pressstart68645 жыл бұрын
Awesome, glad I could help :)
@DanielLeightonArt Жыл бұрын
This and your edge collider hack video really helped solve a problem that had me stuck. Thank you!
@GrosssDude3 жыл бұрын
Absolutely amazing. I have spent HOURS trying to figure this out. Thank you, thank you, thank you.
@Ghatos3 жыл бұрын
My god, THANK YOU! I've been trying to code something simillar and your video made me realise why Screen.width / Screen.height was giving me back the wrong values, I had to write it like this: *(float)* Screen.width / *(float)* Screen.height Thank you a lot for this video, that issue was driving me nuts.
@pedroduran89272 жыл бұрын
I have to thank you very much for this simple and effective solution! it worked great for me for my board game with both Phone and Tablet support!
@MadOliveGaming Жыл бұрын
I was very confused why this worked for everyone but me. Guess what... my script was not check marked so it was disabled all the time xD. Great video, i have a phone with a weird resolution so i needed this to be able to play my own game lmao
@wimbo_learn_music2 жыл бұрын
Exactly what I needed. Perfectly explained. Thanks!
@FortbloxNET3 жыл бұрын
this is exactly what i was searching for, for years. thank you!!!!!!!!!!!!!!!!!!!!!
@NiclasGleesborg05 жыл бұрын
Great explanation :)
@alexbukin9826 жыл бұрын
Thank you very much! Video and sound is awesome, speech is great and it is easy to understand you! Even I am from Russia I did it and it works, thanks again!
@lathspell28853 жыл бұрын
Thanks, I haven't tried it yet but I'm sure it will work. You explained it very well.
@denn501 Жыл бұрын
TYSM!! This is exactly what I was looking for!!!
@IndeedJoe5 жыл бұрын
Great tutorial man!
@pressstart68645 жыл бұрын
thanks man!
@murlocsenpai97273 жыл бұрын
Very well explained, thanks for the video.
@LuyoYoo6 жыл бұрын
This was so useful! Thank you!
@mikulashoblik80395 жыл бұрын
Thank you very much for this solution. It worked really well for me :)
@xkyfal185 жыл бұрын
Good job, it helped a lot, thanks for posting ;)
@xliquid14005 жыл бұрын
Damn u are so so helpful, you are truly underrated
@dand46045 жыл бұрын
How are you so calm? I'm struggling to keep my brain from revving to 12k rpm. Don't know what it's like to be normal anymore
@alleyesonme14324 жыл бұрын
Good Job! Nice explanations suited for beginners. Waiting for next videos, subscribed! BTW, what is rink?)
@sparttenomega454 жыл бұрын
This worked for me. Thanks!
@violentgamer59104 жыл бұрын
Thank you for this Great Tutorial I really Liked it!!
@mmdjn2 жыл бұрын
Thank you for explaining and example
@raingame_5 жыл бұрын
Thanks! U got my subscription!
@АлександрЕрёменко-е5б5 жыл бұрын
Thanks for the video, it helped a lot!
@pressstart68645 жыл бұрын
Glad I can help!
@GurmeetSingh-ui8fd3 жыл бұрын
Hello, good tutorial but what if you are not using spriteRenderer but instead the game object? i created a plane out of the game object and i want to fit the camera to the game object x and y axis. I tried modifying your code where instead of the sprite renderer, i used the transform of the plane where it calculates the x axis and the z axis but still does not work. Do you have any idea for this?
@kebalbadal42244 жыл бұрын
Fantastic bro Helped a lot Thank you bro
@olegfrolovdesign6 жыл бұрын
Well explained 👌
@carlososuna11944 жыл бұрын
you're the best, excellent bro!!
@hyperactiveguy3583 Жыл бұрын
Thanks, it helped me a lot!
@intrer86014 жыл бұрын
Thanks! This was exactly what I was looking for!
@fenix37524 жыл бұрын
What is the rink
@intrer86014 жыл бұрын
@@fenix3752 What do you mean?
@fenix37524 жыл бұрын
@@intrer8601 what is the rink thing he is using in the tut
@intrer86014 жыл бұрын
@@fenix3752 Oh, I used it for my own project, I didn't use the rink thing in the tutorial.
@fenix37524 жыл бұрын
@@intrer8601 than what did you used plz tell me help needed
@greggiles87256 жыл бұрын
This tutorial is 🔥 🔥 🔥 🔥
@pressstart68646 жыл бұрын
Thank you :)
@서리-v3f5 жыл бұрын
thanks for the video, very helpful !! :D
@therightpic4 жыл бұрын
Excellent explanation. I have been trying to figure out these kinds of things for a long time and you do a great job on your videos. Are you still making videos? It doesn't seem like you have anything for a while.
@ShironatsuKun Жыл бұрын
Wow I've been looking for a solution for this issue for weeks. I was using Cinemachine's TargetGroup Camera to replicate this behavior but the TargetGroup feature doesn't work with the PlayerMovement Claming that I'm using so this simple method saved me.
@Omhetehmo5 ай бұрын
Man, you are best!
@inori51385 жыл бұрын
It workeddddddd... I was looking for 1 month oooooloohohhohohohh...
@diegosuarez54736 жыл бұрын
your amaziiiiing Brooooo! i am new suscriber!! Thanks!!!!!!!!!!!!!!
@pressstart68646 жыл бұрын
Welcome brother :)
@amazinggamers356 Жыл бұрын
Great Work
@xamretssam4 жыл бұрын
Thanks, very helpful!!!
@sumitcutevil92602 жыл бұрын
this video is a life saver tysm....
2 жыл бұрын
You are a legend!
@flakylyte48116 жыл бұрын
Hey, nice video!!
@Me-jy6cd2 жыл бұрын
Great tutorial! After a long search finally a good explanation. Does the formula for calculating the orthographic size have a general mathematical reference or name?
@gaborbocskai54204 жыл бұрын
Super helpful!!!
@franchisethebull2 жыл бұрын
Brilliant dude
@ShacharOz4 жыл бұрын
wonderful stuff! thanks a lot. have any idea how to do the Fit to Fill? so there will be no black borders from either portrait or landscape?
@emilkronholm62465 жыл бұрын
10/10 thank u! :D
@Ferenc-Racz Жыл бұрын
Huge thank you! :)
@microexpresionblog4 жыл бұрын
Thanks so much man!!!
@zeebigz24985 жыл бұрын
how do you fit both width and height of the playground edge to the screen size at same time. you have shown weight and height edge fit on screen edge . but how to you do at same time???
@pressstart68645 жыл бұрын
Unfortunately that's not how screen's work. It would be impossible to factor in all screen aspect ratios to have a screen fit both height and width of an object. You could instead alter your object to fit the width and height of the screen, but that's a whole different video.
@sudarshan44335 жыл бұрын
Very helpful. can we use same with canvas? i have problem when screen resolution changes my sprite images which are not part of canvas are get cut off.
@random_precision_software5 жыл бұрын
I'm looking for how to have different screen aspects for different scenes. It seems of you have landscape on the menu scene it does that for all other scene..where I want portrait. How world I do this?
@plasmapig13564 жыл бұрын
Is there a way to make the view orthographic on one axis and perspective on another so if you move closer and further away, things would only get bigger/smaller on one axis? I’m talking about 3D not 2D games.
@matronator2 жыл бұрын
Amazing video! After searching so many tutorials, this is finally the one that actually does what I want! Thank you! One question though: Now it scales based on the screen size only. But on devices like iPhone X that have the weird display with the cut out and round corners it's not really desired. Is there some way to make it scale not to screen size, but the safe area of the screen only?
@sudeepacharya14922 жыл бұрын
Hi, thank you for the tutorial. But this doesn't work when the orthographics camera is rotated 90 on x-axis. Please help! ANd also please make tutorial for Perspective view as well!
@danieljayne86234 жыл бұрын
You sir have saved my ass in LD 47 :D
@serpaolo74134 жыл бұрын
Does this work for Platformer games (Mario Style) where the character is constantly moving and the camera must follow him?
@risingdagger54164 жыл бұрын
thx u made it so ez now
@MagotizilaBr5 жыл бұрын
Hey guys how do i set a start camera position, i'm making a 2d game and i want the camera to stay in the left border where start the game but if the user changes the resolution the camera goes further and swallow a little piece of the scene what should i do to fix this? How do i make the camera stay in the start left border without swallow in it?
@pressstart68645 жыл бұрын
If you know where the edge of your game is, just set the cameras position to the position of the edge plus half screen width.
@MagotizilaBr5 жыл бұрын
@@pressstart6864 ooh thanks man it worked ;) thanks for helping me from the bottom of my heart ;)
@EnderElectrics4 жыл бұрын
@@pressstart6864 I tried that. What if it doesn't work?
@keremaslan19884 жыл бұрын
what should i use instead of rink since my game is more like a normal game
@gabrielulate12124 жыл бұрын
THANK YOU SO MUCH!!!!!
@Ashkan-yf8eu2 жыл бұрын
Thank you!
@rmajumdar823 жыл бұрын
Thanks a lot!
@et92774 жыл бұрын
Thank you thank you thank you!
@kevinkoolen Жыл бұрын
Legend video
@simonk53616 жыл бұрын
Hello Press Start, it is a nice Video, but useless for me because i dont have an Orthograpic camera. I have a Perspective Camera and the script dont work with this type of camera. So, do you want to make a whole new Video about the zooming from a Perspective cam? Would be nice!
@pressstart68646 жыл бұрын
I might make a more in-depth video down the road, but I covered this topic in one of the more recent videos. Here's the link: kzbin.info/www/bejne/apCrhp93e9Grrbc
@EremesNG4 жыл бұрын
Ty a lot bro
@watercat1248 Жыл бұрын
Cool what happened if do that in not orthographic camer ?
@sanketjadhav99813 жыл бұрын
how cam we do this for perspective camera?
@mananmehta23204 жыл бұрын
What if I'm not have sprite background, instead a skybox colour???
@hiepuc63154 жыл бұрын
thank you so much
@Origined4 жыл бұрын
How to get rink???
@PeterMilko4 жыл бұрын
For virtual cameras, public CinemachineVirtualCamera CinemachineVirtualCamera; public SpriteRenderer ScreenSizeSprite; void Start() { float orthagraphicSize = ScreenSizeSprite.bounds.size.x *Screen.height / Screen.width *0.5f; CinemachineVirtualCamera.m_Lens.OrthographicSize = orthagraphicSize; }
@lI-tm4qx3 жыл бұрын
Hello , Peter I think this is exactly what I'm looking for. I'm using cinemachine virtual camera on my game and I cant get it to work properly, here's my script attached to my main camera public SpriteRenderer screenAdapt; public CinemachineVirtualCamera CinemachineVirtualCamera; void Start() { float screenRatio = (float)Screen.width / (float)Screen.height; float targetRatio = screenAdapt.bounds.size.x / screenAdapt.bounds.size.y; CinemachineVirtualCamera.m_Lens.OrthographicSize = targetRatio; if (screenRatio >= targetRatio) { Camera.main.orthographicSize = screenAdapt.bounds.size.y / 2; } else { float differenceInSize = targetRatio / screenRatio; Camera.main.orthographicSize = screenAdapt.bounds.size.y / 2 * differenceInSize; } }
@PeterMilko3 жыл бұрын
@@lI-tm4qx You didn't set it up right. Watch a tutorial.
@mauricepickartz7974 жыл бұрын
what does the "rink" is?
@MuhammadZeeshan-gm3uq4 жыл бұрын
what about UI canvas image can we set the camera size according to UI image on canvas??
@bstrouble3 жыл бұрын
Thats what I wanna know
@user-pw5do6tu7i4 жыл бұрын
Make sure to tag the camera as "MainCamera" otherwise you get a nullObject refference
@kieranpont78995 жыл бұрын
Life saver.
@gildas72004 жыл бұрын
Why is mine so zoomed in?
@robbeldevelopmentstudio98885 жыл бұрын
Thanks!
@christinedelire39742 жыл бұрын
So what is Rink actually ?
@chenariana34825 жыл бұрын
why it shows " camera does not contain main"....?
@pressstart68645 жыл бұрын
Tag your camera as the main camera
@chenariana34825 жыл бұрын
@@pressstart6864 Thanks a lot!!
@ayoubnachit1454 жыл бұрын
What is Rink
@mohansaiteki80124 жыл бұрын
Your charm mate
@klemenremec4 жыл бұрын
Great video, but as I implemented it in my game of pong for android, it gets cut off at 18:9 screen ratio... works with every other screen size or ratio
@marufm81954 жыл бұрын
if your issue is with the border wall colliders this video might help kzbin.info/www/bejne/qJ2vfqqEfppmhdE
@mahmoudshaddad74112 жыл бұрын
thank you
@mr.casual23044 жыл бұрын
Whenever I do this and I open the apk version it never works (just the y axis)
@jnantes04 жыл бұрын
Same here, it worked for me during delopment and for android, but not for PC builds. Could you find your solution?
@michaeldavis69934 жыл бұрын
Yeah so I dont have a Main camera just a camera, and i got an error saying camera has no definition called "Main"
@intrer86014 жыл бұрын
Then just make add this to the start of your code: “public Camera camera”, then drag the camera in the inspector and instead of calling it camera.main.orthographicsize in the script just call it “camera.orthographicsize”.