Hello, guys.
In this section, we're going to define look of the game.
And I want to begin with a camera, because at the moment, if I run forward, my character just runs
away and I cannot see him.
Right.
So where is the player?
I don't know.
That's what we need to do first.
And we're going to use cinema screen.
What is cinema screen and how it's working?
I want to explain with the help of the video I made for my another course, it's basically same information,
so you don't need to worry.
It just has examples that will help me to explain settings of the cinema screen in a better way.
All right, so let's watch it together.
The cinema screen, what is it?
How it works and how we can use it and go through some settings.
Let's go to window Package manager.
If your window doesn't look the same way, what you need to do is click over here and choose Unity Registry.
Now we find cinematic studio and click install.
It will take some time.
And while it does, I'm going to tell you that cinema once was built as an asset that people used to
install to have better camera, because before that, if someone needs to use a special camera, you
would have to code all the settings with the transform and rotation and so on.
But then this beautiful asset was made and now most of the unit developers cannot imagine their life
without it because it's so easy not to control the camera, just like, Wow.
All right, so let's go here.
Click right button cinema chain to the camera.
I'm going to drag my player here to the follow field.
And by now, you'll see that even without any settings, we already have some cool dynamic camera that
follows the player.
Watch this.
Looks more alive.
Looks nice.
And.
That's all the stuff we need, by the way, to hide this ugly color and the background we can.
Just select me in camera, select color picker, and pick the color of the background we have.
So if you didn't draw some parts over, there is going to be covered with the same color we have on
the background over here.
So yeah, we already have some dynamic camera.
This is not what actually I want to use and reason for that is only one.
I made some amount of platformers before and I always use dynamic camera, so I want to make a game
where camera is fixed and you see entire level all together.
You can plan your actions and then make them fast and cool, but still be going to go through some settings
and I'm going to teach you how to use it.
All right, So let's select the city machine open by the over here and then I'll hit play.
And then we're going to do changes in a play mode to see what it does.
First of all, now main camera is controlled by city machine brain.
So whatever changes you do here.
You change position the size, it does not affect it.
It won't work because it is overwritten by machine C machine.
It overwrites all of the settings.
Now, if you want to change size, you need to do it in the city machine, for example here or the size
you can do it just like that or even like that.
Wow, this is so cool and difficult.
Anyway, I'll make it ten back.
And let's open, buddy, and I'm going to go through some settings.
So the camera actually tries to follow not the player, but this yellow dot over here.
I'll increase kill this yellow dot over here.
This what it tries to follow and we can do some changes to make it follow faster or slower.
First settings I wanna go through is screen X and screen Y and it's just changes the position of the
screen like that or like that when it can be used.
I don't know if you have some side scrolling action game where you run just from left to right side
and you kill some enemies on your way and you always need to see what is in front of you like that.
But I want to keep my player in the center so it will be default value five five.
Now there is some dumping and it helps you to slow down the camera's movement.
So now if you see my camera moves quite fast, right, I'll move player back to the area.
So my camera moves quite fast.
And if I'll change this value and I'll exaggerated so we can see the difference, actually, I'll make
it maximum value.
See how slow the camera is following the player?
Very slow.
If I change it on the Y, it's going to be on the Y as well.
Very slow.
It can be used for different purposes to improve game field, for example.
It can be used to, you know, like when you climb in mountain, let's say in a 2D game, you feel the
camera moves too slow and it makes your feeling that it's actually hard to move up.
Well, I hope it does.
This is just my opinion.
Right.
So this will dump in dust.
There is a lookahead time, which is also very useful.
We can increase it and I'll put some small value like 25.
And now when I move to some side, my camera will go ahead of me and show me what is in front.
Unfortunately for the platformer games where you jump a lot, it feels quite easy.
So what we can do here, we can ignore.
Look ahead on the Y.
And now it's much better.
And we can increase smoothing for this one.
So it will do it very slowly and smooth.
And this feels much better.
I'll unselect camera to hide the gizmos.
And now you see how it is.
So nice, right?
Yeah.
So this one is very good option to use.
But again, for now, I'm going to put zero here.
Then there is a dead zone, which is also important and useful.
Let me increase it.
Like that and like that.
And if you remember, I told you that camera tries to follow these yellow dot.
So.
So when you move.
Camera follows the yellow dot, and until the yellow dot exceeds the dead zone, camera won't move.
But if I move here, you see that yellow dot exit the dead zone and camera moves.
But now it doesn't.
So it also feels quite nice.
So you can do some actions in here.
And then when you go there, camera moves to the side.
So this is what that zone for and it's quite useful as well.
There is a soft zone.
So if you make that zone like that.
But you can decrease the soft zone like that.
And your yellow dot won't be able to exit the soft zone.
So camera will move instantly when you go here.
So a soft zone allows you to restrict movement of the yellow dot.
Let me show you the difference.
Now.
Now, look.
Yellow dot goes up and camera goes up like that.
Maybe better on the x axis.
So it moves like that.
You can see that yellow dot can exit the zone.
But if we decrease south zone.
Get instant movement because there is no place for yellow dot to go.
And now this bias settings over here allows you to move this soft zone center.
So you make it like that, or it doesn't work on the X because we don't have it.
Wait a second.
Yeah.
So it allows you to move soft on.
So let's say you can move forward more, but when you go back, the movement is more instant.
Movement of the camera, I mean, of course.
Can be used for some side scrolling game.
You know that old style games where you have a spaceship and you fly to one side to shoot and you can
move your player forward, but you cannot move it back.
These are the kind.
All right.
Now we know a bit about the settings.
Let's go to the next video and set up camera for our needs.
Exactly.
For this game.
See you there.