1
00:00:00,000 --> 00:00:00,000
Hello, guys.

2
00:00:00,000 --> 00:00:02,000
In this section, we're going to define look of the game.

3
00:00:02,000 --> 00:00:08,000
And I want to begin with a camera, because at the moment, if I run forward, my character just runs

4
00:00:08,000 --> 00:00:09,000
away and I cannot see him.

5
00:00:09,000 --> 00:00:09,000
Right.

6
00:00:09,000 --> 00:00:11,000
So where is the player?

7
00:00:11,000 --> 00:00:12,000
I don't know.

8
00:00:12,000 --> 00:00:13,000
That's what we need to do first.

9
00:00:13,000 --> 00:00:15,000
And we're going to use cinema screen.

10
00:00:15,000 --> 00:00:17,000
What is cinema screen and how it's working?

11
00:00:17,000 --> 00:00:22,000
I want to explain with the help of the video I made for my another course, it's basically same information,

12
00:00:22,000 --> 00:00:23,000
so you don't need to worry.

13
00:00:23,000 --> 00:00:28,000
It just has examples that will help me to explain settings of the cinema screen in a better way.

14
00:00:28,000 --> 00:00:30,000
All right, so let's watch it together.

15
00:00:30,000 --> 00:00:32,000
The cinema screen, what is it?

16
00:00:32,000 --> 00:00:35,000
How it works and how we can use it and go through some settings.

17
00:00:35,000 --> 00:00:39,000
Let's go to window Package manager.

18
00:00:39,000 --> 00:00:44,000
If your window doesn't look the same way, what you need to do is click over here and choose Unity Registry.

19
00:00:45,000 --> 00:00:49,000
Now we find cinematic studio and click install.

20
00:00:50,000 --> 00:00:51,000
It will take some time.

21
00:00:51,000 --> 00:00:56,000
And while it does, I'm going to tell you that cinema once was built as an asset that people used to

22
00:00:56,000 --> 00:01:02,000
install to have better camera, because before that, if someone needs to use a special camera, you

23
00:01:02,000 --> 00:01:06,000
would have to code all the settings with the transform and rotation and so on.

24
00:01:06,000 --> 00:01:11,000
But then this beautiful asset was made and now most of the unit developers cannot imagine their life

25
00:01:11,000 --> 00:01:15,000
without it because it's so easy not to control the camera, just like, Wow.

26
00:01:15,000 --> 00:01:17,000
All right, so let's go here.

27
00:01:17,000 --> 00:01:22,000
Click right button cinema chain to the camera.

28
00:01:24,000 --> 00:01:28,000
I'm going to drag my player here to the follow field.

29
00:01:28,000 --> 00:01:35,000
And by now, you'll see that even without any settings, we already have some cool dynamic camera that

30
00:01:35,000 --> 00:01:36,000
follows the player.

31
00:01:36,000 --> 00:01:37,000
Watch this.

32
00:01:38,000 --> 00:01:39,000
Looks more alive.

33
00:01:39,000 --> 00:01:40,000
Looks nice.

34
00:01:40,000 --> 00:01:41,000
And.

35
00:01:43,000 --> 00:01:49,000
That's all the stuff we need, by the way, to hide this ugly color and the background we can.

36
00:01:50,000 --> 00:01:55,000
Just select me in camera, select color picker, and pick the color of the background we have.

37
00:01:56,000 --> 00:02:01,000
So if you didn't draw some parts over, there is going to be covered with the same color we have on

38
00:02:01,000 --> 00:02:03,000
the background over here.

39
00:02:04,000 --> 00:02:07,000
So yeah, we already have some dynamic camera.

40
00:02:07,000 --> 00:02:11,000
This is not what actually I want to use and reason for that is only one.

41
00:02:11,000 --> 00:02:17,000
I made some amount of platformers before and I always use dynamic camera, so I want to make a game

42
00:02:17,000 --> 00:02:20,000
where camera is fixed and you see entire level all together.

43
00:02:20,000 --> 00:02:26,000
You can plan your actions and then make them fast and cool, but still be going to go through some settings

44
00:02:26,000 --> 00:02:28,000
and I'm going to teach you how to use it.

45
00:02:28,000 --> 00:02:35,000
All right, So let's select the city machine open by the over here and then I'll hit play.

46
00:02:35,000 --> 00:02:38,000
And then we're going to do changes in a play mode to see what it does.

47
00:02:38,000 --> 00:02:43,000
First of all, now main camera is controlled by city machine brain.

48
00:02:43,000 --> 00:02:45,000
So whatever changes you do here.

49
00:02:46,000 --> 00:02:49,000
You change position the size, it does not affect it.

50
00:02:49,000 --> 00:02:54,000
It won't work because it is overwritten by machine C machine.

51
00:02:54,000 --> 00:02:56,000
It overwrites all of the settings.

52
00:02:56,000 --> 00:03:01,000
Now, if you want to change size, you need to do it in the city machine, for example here or the size

53
00:03:01,000 --> 00:03:05,000
you can do it just like that or even like that.

54
00:03:05,000 --> 00:03:08,000
Wow, this is so cool and difficult.

55
00:03:10,000 --> 00:03:12,000
Anyway, I'll make it ten back.

56
00:03:16,000 --> 00:03:20,000
And let's open, buddy, and I'm going to go through some settings.

57
00:03:20,000 --> 00:03:25,000
So the camera actually tries to follow not the player, but this yellow dot over here.

58
00:03:25,000 --> 00:03:28,000
I'll increase kill this yellow dot over here.

59
00:03:28,000 --> 00:03:35,000
This what it tries to follow and we can do some changes to make it follow faster or slower.

60
00:03:35,000 --> 00:03:41,000
First settings I wanna go through is screen X and screen Y and it's just changes the position of the

61
00:03:41,000 --> 00:03:45,000
screen like that or like that when it can be used.

62
00:03:45,000 --> 00:03:50,000
I don't know if you have some side scrolling action game where you run just from left to right side

63
00:03:50,000 --> 00:03:55,000
and you kill some enemies on your way and you always need to see what is in front of you like that.

64
00:03:56,000 --> 00:04:01,000
But I want to keep my player in the center so it will be default value five five.

65
00:04:01,000 --> 00:04:07,000
Now there is some dumping and it helps you to slow down the camera's movement.

66
00:04:07,000 --> 00:04:14,000
So now if you see my camera moves quite fast, right, I'll move player back to the area.

67
00:04:14,000 --> 00:04:16,000
So my camera moves quite fast.

68
00:04:16,000 --> 00:04:22,000
And if I'll change this value and I'll exaggerated so we can see the difference, actually, I'll make

69
00:04:22,000 --> 00:04:23,000
it maximum value.

70
00:04:24,000 --> 00:04:27,000
See how slow the camera is following the player?

71
00:04:27,000 --> 00:04:28,000
Very slow.

72
00:04:29,000 --> 00:04:31,000
If I change it on the Y, it's going to be on the Y as well.

73
00:04:31,000 --> 00:04:32,000
Very slow.

74
00:04:32,000 --> 00:04:36,000
It can be used for different purposes to improve game field, for example.

75
00:04:36,000 --> 00:04:43,000
It can be used to, you know, like when you climb in mountain, let's say in a 2D game, you feel the

76
00:04:43,000 --> 00:04:49,000
camera moves too slow and it makes your feeling that it's actually hard to move up.

77
00:04:50,000 --> 00:04:51,000
Well, I hope it does.

78
00:04:51,000 --> 00:04:53,000
This is just my opinion.

79
00:04:54,000 --> 00:04:54,000
Right.

80
00:04:54,000 --> 00:04:56,000
So this will dump in dust.

81
00:04:56,000 --> 00:04:59,000
There is a lookahead time, which is also very useful.

82
00:04:59,000 --> 00:05:03,000
We can increase it and I'll put some small value like 25.

83
00:05:03,000 --> 00:05:09,000
And now when I move to some side, my camera will go ahead of me and show me what is in front.

84
00:05:09,000 --> 00:05:13,000
Unfortunately for the platformer games where you jump a lot, it feels quite easy.

85
00:05:13,000 --> 00:05:15,000
So what we can do here, we can ignore.

86
00:05:15,000 --> 00:05:17,000
Look ahead on the Y.

87
00:05:18,000 --> 00:05:20,000
And now it's much better.

88
00:05:20,000 --> 00:05:23,000
And we can increase smoothing for this one.

89
00:05:23,000 --> 00:05:26,000
So it will do it very slowly and smooth.

90
00:05:26,000 --> 00:05:28,000
And this feels much better.

91
00:05:29,000 --> 00:05:32,000
I'll unselect camera to hide the gizmos.

92
00:05:33,000 --> 00:05:34,000
And now you see how it is.

93
00:05:37,000 --> 00:05:38,000
So nice, right?

94
00:05:41,000 --> 00:05:41,000
Yeah.

95
00:05:41,000 --> 00:05:44,000
So this one is very good option to use.

96
00:05:45,000 --> 00:05:48,000
But again, for now, I'm going to put zero here.

97
00:05:49,000 --> 00:05:53,000
Then there is a dead zone, which is also important and useful.

98
00:05:53,000 --> 00:05:55,000
Let me increase it.

99
00:05:55,000 --> 00:05:58,000
Like that and like that.

100
00:05:59,000 --> 00:06:03,000
And if you remember, I told you that camera tries to follow these yellow dot.

101
00:06:03,000 --> 00:06:04,000
So.

102
00:06:05,000 --> 00:06:07,000
So when you move.

103
00:06:08,000 --> 00:06:13,000
Camera follows the yellow dot, and until the yellow dot exceeds the dead zone, camera won't move.

104
00:06:13,000 --> 00:06:18,000
But if I move here, you see that yellow dot exit the dead zone and camera moves.

105
00:06:18,000 --> 00:06:20,000
But now it doesn't.

106
00:06:20,000 --> 00:06:23,000
So it also feels quite nice.

107
00:06:23,000 --> 00:06:25,000
So you can do some actions in here.

108
00:06:25,000 --> 00:06:28,000
And then when you go there, camera moves to the side.

109
00:06:29,000 --> 00:06:33,000
So this is what that zone for and it's quite useful as well.

110
00:06:34,000 --> 00:06:35,000
There is a soft zone.

111
00:06:40,000 --> 00:06:42,000
So if you make that zone like that.

112
00:06:43,000 --> 00:06:47,000
But you can decrease the soft zone like that.

113
00:06:49,000 --> 00:06:52,000
And your yellow dot won't be able to exit the soft zone.

114
00:06:53,000 --> 00:06:55,000
So camera will move instantly when you go here.

115
00:06:57,000 --> 00:07:00,000
So a soft zone allows you to restrict movement of the yellow dot.

116
00:07:00,000 --> 00:07:02,000
Let me show you the difference.

117
00:07:02,000 --> 00:07:02,000
Now.

118
00:07:03,000 --> 00:07:04,000
Now, look.

119
00:07:04,000 --> 00:07:07,000
Yellow dot goes up and camera goes up like that.

120
00:07:10,000 --> 00:07:11,000
Maybe better on the x axis.

121
00:07:14,000 --> 00:07:15,000
So it moves like that.

122
00:07:18,000 --> 00:07:21,000
You can see that yellow dot can exit the zone.

123
00:07:21,000 --> 00:07:23,000
But if we decrease south zone.

124
00:07:25,000 --> 00:07:29,000
Get instant movement because there is no place for yellow dot to go.

125
00:07:29,000 --> 00:07:33,000
And now this bias settings over here allows you to move this soft zone center.

126
00:07:35,000 --> 00:07:40,000
So you make it like that, or it doesn't work on the X because we don't have it.

127
00:07:41,000 --> 00:07:43,000
Wait a second.

128
00:07:43,000 --> 00:07:43,000
Yeah.

129
00:07:45,000 --> 00:07:46,000
So it allows you to move soft on.

130
00:07:46,000 --> 00:07:53,000
So let's say you can move forward more, but when you go back, the movement is more instant.

131
00:07:53,000 --> 00:07:56,000
Movement of the camera, I mean, of course.

132
00:07:57,000 --> 00:07:59,000
Can be used for some side scrolling game.

133
00:07:59,000 --> 00:08:04,000
You know that old style games where you have a spaceship and you fly to one side to shoot and you can

134
00:08:04,000 --> 00:08:06,000
move your player forward, but you cannot move it back.

135
00:08:07,000 --> 00:08:08,000
These are the kind.

136
00:08:08,000 --> 00:08:08,000
All right.

137
00:08:08,000 --> 00:08:09,000
Now we know a bit about the settings.

138
00:08:09,000 --> 00:08:13,000
Let's go to the next video and set up camera for our needs.

139
00:08:13,000 --> 00:08:13,000
Exactly.

140
00:08:13,000 --> 00:08:14,000
For this game.

141
00:08:15,000 --> 00:08:15,000
See you there.

