0:30 question: when you create a new Bounds, doesnt it set the center to 0,0,0, meaning that 0,0,0 would always be included in the bounds if you do it like that?
@Tarodev2 жыл бұрын
You're right about this, good pick-up. I suppose I didn't catch it it as the maps always included zero here... Fix would be making the centre one of the objects.
@Tarodev2 жыл бұрын
Pinned this, BTW
@alexcubed42702 жыл бұрын
@@Tarodev wow that was a quick reply, thanks!
@alexcubed42702 жыл бұрын
@@Tarodev hey my first pin, thanks! It would be useful if Bounds had a builtin static method to create a new bounds from an enumerable of other bounds. I've needed that functionality quite often and am kinda surprised its not built in to unity
@Tarodev2 жыл бұрын
@@alexcubed4270 yup, that'd be an amazing addition. To be honest unity could add a whole bunch of great helper functions like that
@luqal71122 жыл бұрын
What the.. Didn't know you can return type like that.. Wow.. Knowledge keep on expending. Btw nice responsive design.
@Tarodev2 жыл бұрын
Named tuples babe
@adityapratama18912 жыл бұрын
It's kinda remind me of with Js
@Tarodev2 жыл бұрын
@@adityapratama1891 the deconstructing part is very similar to js
@Vastlee2 жыл бұрын
@@Tarodev time for another convention war? camelCase vs PascalCase for Tuple naming. I always fell into the PascalCase because of the accessibility levels and the fact that the unnamed convention is Item1, Item2 but the bag of variables argument tracks too. No dog in that fight, but you know, anything for those engagement points :)
@Tarodev2 жыл бұрын
@@Vastlee my heart cannot handle another convention war 😂
@fulongfromthegrave2 жыл бұрын
Straight to the point and a very useful trick! Bounds work in mysterious ways. I used them yesterday to dynamically figure out the size of a box trigger in my scene based on how many items are in it.
@Tarodev2 жыл бұрын
Very nice sir
@speedfastman2 жыл бұрын
That font in the thumbnail do be looking real nice.
@hackbeam2 жыл бұрын
Rigth straight to te point. Very usefull algorithm in less than 2 minutes. I didn't know about the Expand() method of the Bounds class. Thats a huge discovery! Thank you, you gained a subscriptor for that
@youcancallmedoggie2 жыл бұрын
Amazing video Mr stranger! Keep em poppin!
@Tarodev2 жыл бұрын
Hey... I know you
@youcancallmedoggie2 жыл бұрын
@@Tarodev I will steal this code by the way! Gonna use it on my new blockbuster game!!
@PitiITNet2 жыл бұрын
Woah! Great video, short and to the point! I love the editing!
@Tarodev2 жыл бұрын
Learning some new tricks here and there...
@FakeMelon2 жыл бұрын
Awesome video, as usual :D
@turkeyjerkey2 жыл бұрын
Excellent tutorial and well-explained. Easy to adapt to my grid-based game, and works like a charm! Much simpler than my code based off calculating the grid aspect ratio vs. the screen aspect ratio. Thanks!
@torzukki2 жыл бұрын
Great tutorial. Very glad I found your channel!
@robelso56462 жыл бұрын
This is exactly what I was looking for, thanks a lot!
@SpicyMelonYT2 жыл бұрын
I would love if you made a video about async extension methods. Something about them are so amazing like the stuff in Dotween that you showed off. Maybe even make the video as an exploration video where you explore what you can make instead of what you already have prepared for the video. But yeah honestly everything you make is enjoyable for me. Thanks man
@Tharky2 жыл бұрын
Wonderful tutorial! I'll absolutely use this idea when I make my own puzzle game (someday)!
@jumpingman66122 жыл бұрын
Neat! Will try it out for my school project.
@shasvatnayak23292 жыл бұрын
The information and presentation in this tutorial is on another level, thanks a ton!🤗
@smecherul0032 жыл бұрын
Cinemachine is a more simple and more powerful option but for some basic smoothing this tutorial is great .
@Tarodev2 жыл бұрын
Don't have to convince me, I love cinemcahine. Although I would prefer to use this script over cinemcahine if this is all the camera requirements of the game.
@MaKimProjects2 жыл бұрын
Just this past week I implemented something far worse to solve for keeping objects in view on different devices. Great info and... now it's time for me to refactor.
@maxfun67972 жыл бұрын
Wow the graphics on this tutorial.
@ikenna20582 жыл бұрын
Hi Tora, please can you do a video on how you make your game graphics look really good. And btw, love your videos.
@jopaslona12 жыл бұрын
Right into the point, thak you! I will use this trick in my next game!
@VictrisGames2 жыл бұрын
This is very useful! Thank your. I’m going to update the GDevelop extension that follows multiple objects using this logic.
@KushagraPratap2 жыл бұрын
1:22 * giggle *
@Tarodev2 жыл бұрын
😁
@matthewmathis622 жыл бұрын
I was looking up how to do this recently, and I very much appreciate you making this video! It almost seems like it was made for me. Thanks for making this video. I really love this channel of yours! Actually, your last video about Naming Conventions (which I'm trying to adhere to) came out days after I looked into the topic... I find this strange. Are you spying on me?! :P
@galaxygur2 жыл бұрын
_buffer variable is not defined, should it be something like suggested by Copilot "bounds.size * 0.5.f" ?
@shinigamirealm98025 ай бұрын
Hello, i know this is an old video but if youre still reading can you give follow up on how to add buffer properly? As buffer would be in world space and as camera size grows thay buffer will become smaller and smaller
@deveshsharma66092 жыл бұрын
Great tutorial , your videos helped me a lot , can you make one tutorial on 2d character swim underwater
@Tarodev2 жыл бұрын
I'll be adding this feature to my 2d controller, but yes that's a really good idea
@TopShelfCookieJar2 жыл бұрын
Which font is that you're using in your code editor at 0:13? Looks crisp and clean!
@n_mckean Жыл бұрын
When you add [ExecuteInEditMode] it doesn't seem to automatically adapt in the Simulator, unless I start Gamemode. Any ideas?
@RaonCreate2 жыл бұрын
nice! thank you
@treppas2 жыл бұрын
So cool 🤯!
@chaostellar2 жыл бұрын
NICE
@IPlumpton2 жыл бұрын
Great tutorial, thanks! I assume for a perspective camera it's easier just to use Cinemachine maybe?
@Tarodev2 жыл бұрын
Yeah, I would probably just default to that 😊
@SweetHoneycode2 жыл бұрын
I see what you did there: "the luxurious 6/9 ratio."
@libiroli2 жыл бұрын
"Illustrious." Even better.
@SaiponathGames2 жыл бұрын
Really cool!
@derpenz53762 жыл бұрын
Why is the center Vector on the last number at -10 instead of 0?
@Silen1t Жыл бұрын
question; Where do I Attach the script ?
@Kidopya2 жыл бұрын
Hello, could you please make a tutorial for split binary aab files for aab files exceeds 150 mb for google play store. Since google play does not accept apks any more its fairly complicated for beginners. Thanks for great tutorials and awsome videos!
@watercat12482 жыл бұрын
Okay but what happened if the game have custom resolution For example in the game im working on the have the opinion off window mode and the player able to get whatever size the window teknlcly the don't have I spefic aspect ratio ? And what happened if the camera is not orthographic ?
@Tarodev2 жыл бұрын
This works for any resolution and aspect, it'll adjust to always fit your scene objects on the screen. Not applicable for perspective camera
@watercat12482 жыл бұрын
@@Tarodev what do you mean by Sean objects ? to by honest the reason I'm interested in my game is the UI in my game What I want to do is to make wean the player has different aspect ratio to move or chenge the UI position and size for example when Saman 5:6 aspect ratio to have the position off the UI I little differently same if the use vertical monitor It's is pasble to do samthin like that ?
@Tarodev2 жыл бұрын
@@watercat1248 UI Scaling is a whole other thing. I have a responsive UI design video. This one is for game objects
@watercat12482 жыл бұрын
@@Tarodev okay
@GreLLPro2 жыл бұрын
Thanks! But... Why you must multiply bound.size.x by aspect ratio? I'm a little confuse
@BobrLovr2 жыл бұрын
Why is x the only thing affected by aspect ratio? Why don't you have to do that for y?
@TheDeadlyDalek Жыл бұрын
Is this needed with the pixel perfect camera? It seems the pixel perfect camera should handle this for you but its not scaling my game up at different resolutions I choose in the resolution drop down.
@ЕвгенийКуркин-ц3ш2 жыл бұрын
Thank you very much for the lesson. I have a question, I have an area on the canvas (for example, Image) in which I want to arrange the created gameobjects in the form of a game field using your example. with the setting of the camera position for the center of the game objects and the area, everything works out for me. But it is not possible to make the necessary orthographicSize so that they fit in the area. Are there options for how to do this?
@CheeseChuckie2 жыл бұрын
Hello friend, do Patreons get downloads of these projects?
@luizthiagosouza53772 жыл бұрын
I never thought that Unity supports tuples.. How long ago?
@Tarodev2 жыл бұрын
Quite some time now brother 😊
@MrSmartass422 жыл бұрын
But you didn't tell me to like, subscribe and hit the bell? jkjk good stuff! Thanks!
@martijndrenth27272 жыл бұрын
Amazing video and content, but mannn the title is off Edit: Much better now!
@Tarodev2 жыл бұрын
What do you mean?
@SystemOfATool2 жыл бұрын
@@Tarodev it is indeed a bit off. The video is about making a camera that is responsive to the level design, it doesn't really have much to do with game design. But who cares, you don't even need titles, we'd all still click on your videos!
@Tarodev2 жыл бұрын
@@SystemOfATool well, I do want accurate titles. I figured responsive design in the same sense as a responsive website. I should probably change it to 'responsive camera design'. Thanks boys, I'll do it shortly
@itzfried2 жыл бұрын
This could be very cool for a Smash Bros type camera, focussing on all players
@MarkRiverbank2 жыл бұрын
This was specifically a head-on orthographic camera, like a puzzle game. But, Cinemachine already has “Target Group” and “Look At” functionality that gets you most of the way to a Smash Bros type of camera.
@itzfried2 жыл бұрын
@@MarkRiverbank Ahh okay, thanks! Never used cinemachine, yet. Only the standard orthographic cam
@LocalContentShow2 жыл бұрын
Cinemachine really is as good as advertised for what it's worth. In the new GMTK series he spent DAYS creating a custom camera system only to realise that Cinemachine did it better, easier.
@MarkRiverbank2 жыл бұрын
@@LocalContentShow yes, it’s a phenomenal package. It’s one of several areas where Unity does laps around Unreal in quality-of-life for indy developers.
@blazereaper1761 Жыл бұрын
Nice
@matthigamer12 жыл бұрын
But why get the pixelHeight and pixelWidth for the ratio when you can just call _cam.aspect? (Or 1 / _cam.aspect if you want height / width) 😅 Anyway great video as always. 😄
@emanueltejadacoste22502 жыл бұрын
Pretty adavanced, i didnt get a single shit out of this video xd