1 00:00:23.540 --> 00:00:27.190 Hello, this is Youngho Lee, who will be lecturing the Unreal Engine Network 2 00:00:27.190 --> 00:00:29.640 In the game and big game fields 3 00:00:29.640 --> 00:00:32.140 Unreal Engine has a significant usage rate 4 00:00:32.140 --> 00:00:35.660 And its proportion is increasing across all industries 5 00:00:35.660 --> 00:00:37.160 In particular, it is receiving 6 00:00:37.160 --> 00:00:39.560 Much attention in games 7 00:00:39.560 --> 00:00:41.540 Movies, and media arts 8 00:00:41.540 --> 00:00:44.640 The engine itself provides many functions 9 00:00:44.640 --> 00:00:47.840 And among them, its network engine 10 00:00:47.840 --> 00:00:50.369 Which has proven stability and optimization 11 00:00:50.369 --> 00:00:53.119 is essential when producing multi-user network games 12 00:00:53.119 --> 00:00:54.660 With Unreal Engine 13 00:00:54.660 --> 00:00:55.860 In this lecture 14 00:00:55.860 --> 00:00:59.110 We will learn through various examples 15 00:00:59.110 --> 00:01:01.860 How Unreal Engine's network structure is structured 16 00:01:01.860 --> 00:01:04.419 And how synchronization is performed 17 00:01:04.419 --> 00:01:05.969 Network classes first 18 00:01:05.969 --> 00:01:08.580 Begin based on single-game production 19 00:01:08.580 --> 00:01:10.880 The class will then 20 00:01:10.880 --> 00:01:13.080 Be expanded to a network game 21 00:01:13.080 --> 00:01:15.130 That can be played by multiplayer 22 00:01:15.130 --> 00:01:16.860 On a network 23 00:01:16.860 --> 00:01:18.710 First, creating a single game 24 00:01:18.710 --> 00:01:20.310 Now, let's take a look at 25 00:01:20.310 --> 00:01:23.059 How single-game production progresses 26 00:01:23.059 --> 00:01:25.759 It consists of 9 words in total 27 00:01:25.759 --> 00:01:27.559 And by implementing each content 28 00:01:27.559 --> 00:01:31.580 We will learn how to utilize the detailed technologies of Unreal Engine 29 00:01:31.580 --> 00:01:33.580 For the first step in creating a single game 30 00:01:33.580 --> 00:01:37.980 We will learn about creating a project and creating a third-person player 31 00:01:37.980 --> 00:01:40.180 In this unit, you will learn 32 00:01:40.180 --> 00:01:41.730 How to 33 00:01:41.730 --> 00:01:43.680 Create a project 34 00:01:43.680 --> 00:01:46.680 Set up the created project 35 00:01:46.680 --> 00:01:48.070 And finally create a third-person player 36 00:01:48.070 --> 00:01:51.450 Creating and Setting Up a C Based Project 37 00:01:52.000 --> 00:01:55.750 When the Unreal Project Browser opens like this 38 00:01:55.750 --> 00:01:59.459 We can select the project 39 00:01:59.459 --> 00:02:01.959 Here, we will choose the Third Person 40 00:02:01.959 --> 00:02:08.380 We will create a network project based on this template 41 00:02:08.380 --> 00:02:12.330 In the Third Person, we will create 42 00:02:12.330 --> 00:02:15.059 A network project based on this template 43 00:02:15.059 --> 00:02:19.409 We are trying to create a C based project 44 00:02:19.409 --> 00:02:22.580 Select C on the right 45 00:02:22.580 --> 00:02:24.180 Then, there's the Starter Content here, right? 46 00:02:24.180 --> 00:02:27.330 Please check this 47 00:02:27.330 --> 00:02:29.180 Next, as for the project's path 48 00:02:29.180 --> 00:02:32.080 I created a folder in the project folder on the C Drive 49 00:02:32.080 --> 00:02:34.020 Called Unreal 50 00:02:34.020 --> 00:02:37.370 Here, I will make a project name 51 00:02:37.370 --> 00:02:39.170 Here, I will name the project 52 00:02:39.170 --> 00:02:43.500 NetTPS 53 00:02:44.339 --> 00:02:47.020 Looking again 54 00:02:47.860 --> 00:02:50.060 First, set the game category 55 00:02:50.060 --> 00:02:53.779 I chose this and then the Third Person 56 00:02:53.779 --> 00:02:57.179 Then, select it as a C project 57 00:02:57.179 --> 00:02:59.979 Next, the starter content project's name 58 00:02:59.979 --> 00:03:02.059 is set as NetTPS 59 00:03:02.059 --> 00:03:04.659 Let's leave it like this 60 00:03:04.659 --> 00:03:07.740 And click the 'Create' button here to create the project 61 00:03:10.990 --> 00:03:14.590 If we wait like this, Visual Studio will open 62 00:03:14.590 --> 00:03:16.890 Since the project was created based on C 63 00:03:16.890 --> 00:03:18.820 Visual Studio opens 64 00:03:18.820 --> 00:03:22.470 And then Unreal Editor is opening 65 00:03:22.570 --> 00:03:24.670 The project we have created now 66 00:03:24.670 --> 00:03:27.070 Can be seen 67 00:03:27.070 --> 00:03:30.500 Under the NetTPS source folder 68 00:03:30.500 --> 00:03:35.140 Under the Games folder 69 00:03:36.820 --> 00:03:38.820 When Unreal Editor opens 70 00:03:38.820 --> 00:03:40.470 It looks like this 71 00:03:40.520 --> 00:03:45.500 We will try to transform 72 00:03:45.500 --> 00:03:49.350 This project into a different form 73 00:03:49.350 --> 00:03:51.950 This transformation will make 74 00:03:51.950 --> 00:03:55.179 The project a little more manageable 75 00:03:55.179 --> 00:03:56.779 Like this, when the Editor opens 76 00:03:56.779 --> 00:04:00.190 I will close the Editor for now 77 00:04:02.189 --> 00:04:03.739 Right? 78 00:04:03.739 --> 00:04:07.739 Then, you'll see the Solution Explorer on the right here 79 00:04:07.739 --> 00:04:09.660 And you'll see Visual Studio 80 00:04:09.660 --> 00:04:11.260 If you look here in Visual Studio 81 00:04:11.260 --> 00:04:13.810 Under the NetTPS folder on the right 82 00:04:13.810 --> 00:04:17.220 There is a source folder 83 00:04:17.250 --> 00:04:22.050 Below are script files like this 84 00:04:22.050 --> 00:04:24.540 There are C files 85 00:04:24.540 --> 00:04:26.040 Rather than leaving them like this 86 00:04:26.040 --> 00:04:27.940 For them to be easily managed 87 00:04:27.940 --> 00:04:30.440 I will divide the project settings and folders 88 00:04:30.440 --> 00:04:35.140 Then we will learn about the project settings in the next section 89 00:04:35.140 --> 00:04:41.859 Now, let's look at project settings 90 00:04:41.859 --> 00:04:45.009 First, let's close the Solution Explorer 91 00:04:45.009 --> 00:04:48.619 And close Visual Studio 92 00:04:48.619 --> 00:04:51.219 And let's move to the project folder 93 00:04:51.219 --> 00:04:54.220 We just created 94 00:04:55.059 --> 00:04:57.759 Open Explorer, and in Explorer 95 00:04:57.759 --> 00:04:59.959 I created NetTPS in the Unreal folder 96 00:04:59.959 --> 00:05:03.300 In the project folder on the C Drive 97 00:05:03.300 --> 00:05:08.060 Let's move to the NetTPS project folder 98 00:05:08.859 --> 00:05:11.159 The part where we want to change the structure is 99 00:05:11.159 --> 00:05:14.619 Moved into the source folder 100 00:05:14.619 --> 00:05:16.919 There's a NetTPS folder 101 00:05:16.919 --> 00:05:19.269 Here are all the C classes 102 00:05:19.269 --> 00:05:22.179 We are using now 103 00:05:22.179 --> 00:05:23.379 These kinds of files are here 104 00:05:23.379 --> 00:05:27.899 Let's work on them separately 105 00:05:27.980 --> 00:05:29.480 To manage easily 106 00:05:29.480 --> 00:05:31.980 First, I will create a folder here 107 00:05:31.980 --> 00:05:36.660 And name the folder, Public Folder 108 00:05:36.660 --> 00:05:42.380 We will make the other one a Private Folder 109 00:05:42.380 --> 00:05:44.930 In Public, header files 110 00:05:44.930 --> 00:05:49.179 That can be shared externally are placed 111 00:05:51.115 --> 00:05:54.115 And then select cpp files 112 00:05:54.115 --> 00:05:57.940 This time, Private, it's commonly called a Source File 113 00:05:57.940 --> 00:05:59.940 Get the source files 114 00:05:59.940 --> 00:06:02.960 And put them into the Private Folder like this 115 00:06:05.367 --> 00:06:07.817 This makes project management very easy 116 00:06:07.817 --> 00:06:11.767 Even when distributing later, some security folders are 117 00:06:11.767 --> 00:06:15.059 Put into a Private Folder like this to work on 118 00:06:15.059 --> 00:06:17.059 When exporting plug-ins to the outside 119 00:06:17.059 --> 00:06:18.759 It is better to manage them this way 120 00:06:18.759 --> 00:06:20.809 Because they are modularized 121 00:06:20.809 --> 00:06:22.299 And easy to work with 122 00:06:22.299 --> 00:06:25.149 We have to create folder by dividing them into two folders 123 00:06:25.149 --> 00:06:29.069 Public Folder and Private Folder 124 00:06:29.619 --> 00:06:31.269 After doing this 125 00:06:31.269 --> 00:06:34.669 We need to create a project again 126 00:06:34.669 --> 00:06:35.899 How? 127 00:06:35.899 --> 00:06:41.149 Here, you can see the NetTPS.uproject Unreal Project File 128 00:06:41.149 --> 00:06:43.299 Right-click on it 129 00:06:43.299 --> 00:06:45.749 And select the 130 00:06:45.749 --> 00:06:47.999 Generative Visual Studio Project file 131 00:06:47.999 --> 00:06:51.940 In Windows 11, there is 'More Detailed View' menu 132 00:06:51.940 --> 00:06:53.890 If you click on it and enter it 133 00:06:53.890 --> 00:06:55.805 You will find a Generate Visual Studio Project file 134 00:06:55.805 --> 00:06:58.455 If you click this 135 00:06:58.459 --> 00:07:02.750 It will literally re-create the Visual Studio Project file 136 00:07:07.600 --> 00:07:11.050 This will create a new solution file for your 137 00:07:11.050 --> 00:07:13.820 Visual Studio Project file 138 00:07:13.820 --> 00:07:15.270 I right-clicked 139 00:07:15.270 --> 00:07:19.380 the Generative Visual Project file 140 00:07:19.380 --> 00:07:23.030 As I mentioned, in Windows 11 141 00:07:23.030 --> 00:07:27.980 The 'Show more options' menu appears in the mouse pop-up like this 142 00:07:27.980 --> 00:07:30.619 Please note that the Generative Visual Studio Project 143 00:07:30.619 --> 00:07:33.919 File menu appears when you click this 144 00:07:33.919 --> 00:07:36.579 This will create a new solution file 145 00:07:36.579 --> 00:07:38.879 Let's open this and double-click again 146 00:07:38.879 --> 00:07:42.299 To open the project 147 00:07:45.779 --> 00:07:49.179 Let's go back to the Solution Explorer and take a look 148 00:07:49.179 --> 00:07:52.879 When you go to Solution Explorer in Visual Studio 149 00:07:52.879 --> 00:07:56.350 There is Source under NetTPS, then NetTPS 150 00:07:56.350 --> 00:07:57.850 And then 151 00:07:57.850 --> 00:08:00.459 The Public and Private folders we created are listed like this 152 00:08:00.459 --> 00:08:03.309 You can see that the header and cpp files 153 00:08:03.309 --> 00:08:05.779 are also divided this way 154 00:08:05.779 --> 00:08:09.129 If it happens, let's build again 155 00:08:09.129 --> 00:08:12.299 And run Unreal Editor 156 00:08:12.299 --> 00:08:15.099 You can build by right-clicking 157 00:08:15.099 --> 00:08:16.449 And building 158 00:08:16.449 --> 00:08:19.100 To run the editor while building at once 159 00:08:19.100 --> 00:08:20.400 There's an .exe file here, right? 160 00:08:20.400 --> 00:08:22.900 Let's click this to run it 161 00:08:22.900 --> 00:08:28.299 Then, it will build and run Unreal Editor at the same time 162 00:08:33.219 --> 00:08:37.019 This will open a new Unreal Editor 163 00:08:38.460 --> 00:08:44.510 When it opens, we will chage the screen layout a little 164 00:08:44.510 --> 00:08:47.970 To make working here easier 165 00:08:49.659 --> 00:08:52.859 If you scroll down from the Window menu 166 00:08:52.859 --> 00:08:56.500 In Unreal Editor, you will find Load Layout 167 00:08:56.500 --> 00:08:59.100 Then, there's the UE4 Classic Layout 168 00:08:59.100 --> 00:09:01.179 I will work on this 169 00:09:01.179 --> 00:09:05.429 When you click on it, only the viewport window appears like this 170 00:09:05.429 --> 00:09:06.979 Then the Place Actor on the left 171 00:09:06.979 --> 00:09:09.059 Then the Outliner 172 00:09:09.059 --> 00:09:14.859 I will work like this so that the default content browser 173 00:09:14.859 --> 00:09:16.700 and all of these are preloaded 174 00:09:16.700 --> 00:09:21.400 Edit Menu to Window Menu to Load Layout 175 00:09:21.450 --> 00:09:25.950 Next, click on the UE4 Classic Layout 176 00:09:25.950 --> 00:09:30.500 And if you look again, the content browser will appear in advance 177 00:09:30.500 --> 00:09:33.539 Just leave it like this 178 00:09:33.539 --> 00:09:37.589 If this has been done 179 00:09:37.589 --> 00:09:42.140 We will create a folder in advance in the content browser 180 00:09:42.140 --> 00:09:44.840 And make some settings in advance 181 00:09:44.840 --> 00:09:48.450 To work by inserting essential data into this folder 182 00:09:48.550 --> 00:09:50.900 The content folder here 183 00:09:50.900 --> 00:09:55.900 I will move the content browser here 184 00:09:56.539 --> 00:10:00.239 I will first create a folder here 185 00:10:00.239 --> 00:10:03.700 Right-click under the content folder and create 186 00:10:03.700 --> 00:10:05.500 A New Folder 187 00:10:05.500 --> 00:10:09.480 And a folder named NetTPS 188 00:10:11.340 --> 00:10:16.440 We will create the necessary folders within the NetTPS folder 189 00:10:16.440 --> 00:10:18.390 Create subfolders 190 00:10:18.390 --> 00:10:20.739 And continue to create files there 191 00:10:20.739 --> 00:10:24.539 First, when we first created the project 192 00:10:24.539 --> 00:10:26.489 With StarterContent and then 193 00:10:26.489 --> 00:10:30.260 Third Person type template, we created it 194 00:10:30.260 --> 00:10:33.610 Here, there's Third Person type folder 195 00:10:33.610 --> 00:10:37.380 There are things like Third Person, Blueprint, Input, etc. 196 00:10:37.380 --> 00:10:40.380 If you go to this blueprint folder 197 00:10:40.380 --> 00:10:43.830 There is a BP Third Third Person Blueprint file that we will be working with 198 00:10:43.830 --> 00:10:47.580 Then, if you go to the Input folder, there are several inputs 199 00:10:47.580 --> 00:10:50.930 We will move these two things 200 00:10:50.930 --> 00:10:55.419 The Blueprints and Input folders, to the NetTPS folders 201 00:10:55.419 --> 00:11:01.919 By drag and drop, I chose Move Here 202 00:11:01.919 --> 00:11:05.020 And moved these to NetTPS like this 203 00:11:05.920 --> 00:11:08.770 Next, here, we will do UI work too 204 00:11:08.770 --> 00:11:12.059 So, I'm going to make a UI folder here now 205 00:11:12.059 --> 00:11:16.259 Click the mouse right button, choose New Folder 206 00:11:16.259 --> 00:11:19.980 And name it UI 207 00:11:21.949 --> 00:11:26.039 I will make several, so maybe I should put 's' 208 00:11:26.039 --> 00:11:29.469 S, Input 209 00:11:30.820 --> 00:11:34.309 I will put 's' here too, and make it Inputs 210 00:11:37.140 --> 00:11:39.490 I've made a folder structure like this 211 00:11:39.490 --> 00:11:42.440 I'll add a few more folders 212 00:11:42.440 --> 00:11:44.140 Later as needed 213 00:11:44.140 --> 00:11:47.390 I made folders this much 214 00:11:47.390 --> 00:11:51.540 Next,m right now, we'll be working on 215 00:11:51.540 --> 00:11:53.700 A single game mode first 216 00:11:53.700 --> 00:11:57.050 To create Multiplayer later 217 00:11:57.050 --> 00:12:01.700 I will change the Editor Settings related to this a little 218 00:12:02.859 --> 00:12:04.209 It's testing 219 00:12:04.209 --> 00:12:07.959 When working in multiplayer or network mode 220 00:12:07.959 --> 00:12:09.509 I plan to configure the test environment 221 00:12:09.509 --> 00:12:12.460 To make it more convenient 222 00:12:12.460 --> 00:12:19.169 If you look here, there's a settings button in play mode 223 00:12:19.169 --> 00:12:21.369 There's a Settings button here in dot dot dot mark 224 00:12:21.369 --> 00:12:23.750 When you click here 225 00:12:24.500 --> 00:12:27.500 There's a Net Mode 226 00:12:27.500 --> 00:12:34.020 First, choose Play As Listen Server for Net Mode 227 00:12:34.099 --> 00:12:37.849 It is done 228 00:12:37.849 --> 00:12:41.219 Then, under here is Advanced Settings 229 00:12:41.219 --> 00:12:44.569 You can click here 230 00:12:44.569 --> 00:12:49.619 Then, Editor Preferences window comes out 231 00:12:49.619 --> 00:12:51.019 You can do like this 232 00:12:51.019 --> 00:12:55.140 Also, in Edit, there's Editor Preferences too 233 00:12:55.140 --> 00:13:00.290 You can click the Editor Preference in the Edit menu 234 00:13:00.290 --> 00:13:03.219 Then, the Editor Preference window pops out 235 00:13:03.219 --> 00:13:06.819 I will do some searching here 236 00:13:06.819 --> 00:13:10.019 There are situations like this when we need to open multiple windows when testing 237 00:13:10.019 --> 00:13:12.500 So, we will make sure that 238 00:13:12.500 --> 00:13:16.300 The windows are blocked by these editors or other windows 239 00:13:16.300 --> 00:13:21.120 So, let's type 'always on top' here 240 00:13:21.120 --> 00:13:24.380 When you look here, Level Editor-Play 241 00:13:24.380 --> 00:13:26.480 There's a menu called 'Always On Top' 242 00:13:26.480 --> 00:13:30.460 I will check this option and activate it 243 00:13:30.460 --> 00:13:34.610 Then, our editor will always appear at the top like this 244 00:13:34.610 --> 00:13:40.349 Then, when we click the environment setting button here 245 00:13:40.349 --> 00:13:42.299 There's Number of Players 246 00:13:42.299 --> 00:13:46.460 It means that the number of the player is one 247 00:13:46.460 --> 00:13:49.760 But I want to allow multiple people to participate 248 00:13:49.760 --> 00:13:51.310 When you run it for the first time 249 00:13:51.310 --> 00:13:54.020 You need to set the number of people 250 00:13:54.020 --> 00:13:55.420 But I want to 251 00:13:55.420 --> 00:13:57.970 Add one by one as needed 252 00:13:57.970 --> 00:14:00.699 To do this 253 00:14:01.580 --> 00:14:05.030 Here, in Editor Preferences 254 00:14:05.030 --> 00:14:09.140 I will type 'allow late joining' 255 00:14:09.140 --> 00:14:11.840 But you just can search 'joining' 256 00:14:11.840 --> 00:14:13.940 When you just type 'joining' 257 00:14:13.940 --> 00:14:16.979 You will see 'Allow late joining' here 258 00:14:16.979 --> 00:14:19.429 Check here 259 00:14:19.429 --> 00:14:21.379 This means 260 00:14:21.379 --> 00:14:24.679 If anything, this option will allow other clients to participate 261 00:14:24.679 --> 00:14:27.220 While playing after clicking the play button 262 00:14:27.220 --> 00:14:29.220 It's that option 263 00:14:29.220 --> 00:14:33.059 Select these two options 264 00:14:33.059 --> 00:14:37.709 And press the play button 265 00:14:37.709 --> 00:14:39.359 One will appear first 266 00:14:39.359 --> 00:14:41.159 And then, you will see an 267 00:14:41.159 --> 00:14:45.040 Add another Client button if you go here 268 00:14:45.040 --> 00:14:47.940 Here, on the play button 269 00:14:47.940 --> 00:14:49.940 The button next to the stop button 270 00:14:49.940 --> 00:14:52.940 When you hover your mouse over this 271 00:14:52.940 --> 00:14:54.690 Add another client will pop up 272 00:14:54.690 --> 00:14:58.219 If you click on it, you will see another pop up appear 273 00:14:58.219 --> 00:15:00.069 Another window will pop up 274 00:15:00.069 --> 00:15:04.669 Unreal's network is designed to support 275 00:15:04.669 --> 00:15:07.539 Multiplayer by default 276 00:15:07.539 --> 00:15:09.389 So, even if we don't do anything 277 00:15:09.389 --> 00:15:11.989 What about I move like this now? 278 00:15:11.989 --> 00:15:17.900 You can see that the character's movements are synchronized in both windows 279 00:15:17.900 --> 00:15:22.500 This very good network mode is set by default 280 00:15:22.500 --> 00:15:25.150 Then, 'What? Then it's not a big deal, is it?' 281 00:15:25.150 --> 00:15:26.299 You may be thinking like this 282 00:15:26.299 --> 00:15:29.299 Then, nothing can be done 283 00:15:29.299 --> 00:15:32.349 We can do the basics, but when we make a project 284 00:15:32.349 --> 00:15:34.659 There will be various synchronization process 285 00:15:34.659 --> 00:15:37.759 That needs to be done, and some that shouldn't be 286 00:15:37.759 --> 00:15:40.259 Additionally, for more detailed 287 00:15:40.259 --> 00:15:42.739 Network processing or other such things 288 00:15:42.739 --> 00:15:45.489 But Unreal Engine cannot tell in such cases 289 00:15:45.489 --> 00:15:49.189 So, when the basic character moves 290 00:15:49.189 --> 00:15:51.189 The network handles synchronization and such things 291 00:15:51.189 --> 00:15:54.820 But other things that require more detailed modes 292 00:15:54.820 --> 00:15:57.620 Have to be done manually 293 00:15:57.620 --> 00:16:00.020 But the fact that we can already get to this point is 294 00:16:00.020 --> 00:16:02.820 Very convenient for us 295 00:16:02.842 --> 00:16:03.780 Done, right? 296 00:16:03.780 --> 00:16:06.330 I will close this by pressing Esc 297 00:16:06.330 --> 00:16:10.243 We completed the project settings 298 00:16:10.243 --> 00:16:13.743 Creating Third Person Player 299 00:16:14.700 --> 00:16:17.800 I will create a third-person player 300 00:16:17.800 --> 00:16:22.950 In the TPS folder 301 00:16:22.950 --> 00:16:26.400 BP Third Person has been made 302 00:16:26.795 --> 00:16:28.845 Right? We made this 303 00:16:28.845 --> 00:16:32.245 I will modify some options 304 00:16:32.245 --> 00:16:35.619 And there will be some methods we will use in the game 305 00:16:35.619 --> 00:16:39.569 I will modify these slightly to the desired way 306 00:16:39.569 --> 00:16:41.969 Then, to the C class 307 00:16:41.969 --> 00:16:44.539 To modify and add more content related to this 308 00:16:44.539 --> 00:16:47.089 I will add some content related to this 309 00:16:47.089 --> 00:16:50.700 First, here's BP Third Person Blueprint 310 00:16:50.700 --> 00:16:53.700 There's Blueprint folder in NetTPS 311 00:16:53.700 --> 00:16:56.500 Double click this 312 00:16:57.179 --> 00:17:02.120 Then, click the Open Full Blueprint Editor 313 00:17:03.260 --> 00:17:07.210 And I will grab this and paste it here 314 00:17:07.210 --> 00:17:11.760 Next, there is BP Third Person character 315 00:17:11.760 --> 00:17:13.859 Things we have to work on is 316 00:17:13.859 --> 00:17:17.009 When we go down, here, in Components 317 00:17:17.009 --> 00:17:19.709 There is Character Movement component 318 00:17:19.709 --> 00:17:20.809 Right? 319 00:17:20.809 --> 00:17:24.099 Here is a Character Movement Component 320 00:17:24.099 --> 00:17:29.699 And, on the right, I'll go to the details window in this Character Movement Component 321 00:17:29.699 --> 00:17:35.579 Let's try searching for 'rotation' here 322 00:17:35.579 --> 00:17:37.529 There are several options 323 00:17:37.529 --> 00:17:40.429 Among those, the option we will use is 324 00:17:40.429 --> 00:17:43.619 Use Controller Desire Rotation 325 00:17:43.619 --> 00:17:47.869 I will remove Orient Rotation to Movement 326 00:17:47.869 --> 00:17:50.740 These are supposed to rotate in the direction of movement 327 00:17:50.740 --> 00:17:51.402 Right? 328 00:17:51.402 --> 00:17:54.952 We just want to have it rotate in the direction we control 329 00:17:54.952 --> 00:17:56.819 For example, here's how to use it 330 00:17:56.819 --> 00:17:57.969 I'll play it 331 00:17:57.969 --> 00:17:59.869 Our character is like this now 332 00:17:59.869 --> 00:18:02.569 We move, it moves front and back like this 333 00:18:02.569 --> 00:18:04.579 It also moves right and left 334 00:18:04.579 --> 00:18:07.779 But I don't like how the screen keeps rotating in the direction 335 00:18:07.779 --> 00:18:10.129 The character's moving when it moves 336 00:18:10.129 --> 00:18:13.029 Why? Because with the gun 337 00:18:13.029 --> 00:18:16.420 We want to have an aim mode so we can shoot at other users 338 00:18:16.420 --> 00:18:18.720 However, I only have to face forward when it's like this 339 00:18:18.720 --> 00:18:22.120 If I do in this mode, I can shoot myself 340 00:18:22.120 --> 00:18:23.660 I mean, to the observer 341 00:18:23.660 --> 00:18:27.110 So, I will modify the movement mode to not work like this 342 00:18:27.110 --> 00:18:30.960 In the form of FPS, Third Person, or T-PASS 343 00:18:30.960 --> 00:18:35.819 I'm trying to change the mode into a shooting game 344 00:18:35.819 --> 00:18:38.319 Let's go into the BP Third Person Character 345 00:18:38.319 --> 00:18:40.369 In the Character Movement 346 00:18:40.369 --> 00:18:44.579 I will check the Use Controller Desire Rotation 347 00:18:44.579 --> 00:18:50.500 And I will uncheck the Orient Rotation to Movement 348 00:18:50.660 --> 00:18:54.179 As you see, these two options are changed like this 349 00:18:54.179 --> 00:18:55.840 Right? 350 00:18:56.579 --> 00:19:00.079 Compile again, and it's not saved, right? 351 00:19:00.079 --> 00:19:01.829 I will save it too 352 00:19:01.829 --> 00:19:03.699 But this is very uncomfortable 353 00:19:03.699 --> 00:19:05.549 When you continue working later 354 00:19:05.549 --> 00:19:07.549 You have to keep on doing compile and save 355 00:19:07.549 --> 00:19:09.699 To do these at once 356 00:19:09.699 --> 00:19:12.699 There's a Setting button next to the Compile button 357 00:19:12.699 --> 00:19:20.260 I will click this and choose the Save on Compile button 358 00:19:20.260 --> 00:19:22.910 And select the 'Always' button at the bottom 359 00:19:22.910 --> 00:19:27.979 I will make do this so that I can compile and save at the same time 360 00:19:27.979 --> 00:19:32.729 The structure allows you to compile and save at the same time 361 00:19:32.729 --> 00:19:36.939 Let's run it again and see how it feels 362 00:19:36.939 --> 00:19:38.839 I'll press the play button again 363 00:19:38.839 --> 00:19:42.239 Earlier, when I was moving, and I turned left 364 00:19:42.239 --> 00:19:43.900 The screen also rotated to the left 365 00:19:43.900 --> 00:19:47.850 But now it is moving in this form 366 00:19:47.850 --> 00:19:51.020 When going back and forth, it just runs like this 367 00:19:51.020 --> 00:19:53.570 Of course, only the animation will be changed to the animation 368 00:19:53.570 --> 00:19:54.920 We want behind 369 00:19:54.920 --> 00:19:57.540 But now, we will just do like this 370 00:19:57.540 --> 00:20:02.140 So when the character rotates, it moves in the direction it rotates and shoots 371 00:20:02.140 --> 00:20:06.739 I changed the view mode a bit so I could do this 372 00:20:06.739 --> 00:20:10.489 Next, when I play, the character is too far away 373 00:20:10.489 --> 00:20:13.639 You know the game, BATTLEGROUNDS 374 00:20:13.639 --> 00:20:18.319 I will change this a little bit like BATTLEGROUND mode 375 00:20:18.319 --> 00:20:20.819 This is what it feels like when it comes to BATTLEGROUND mode 376 00:20:20.819 --> 00:20:24.819 There is a screen, and the character is in the exact center 377 00:20:24.819 --> 00:20:28.269 If this is the exact center 378 00:20:28.269 --> 00:20:31.819 It is slightly off to the left, right? 379 00:20:31.819 --> 00:20:33.769 It's like this, and the camera is in the exact center 380 00:20:33.769 --> 00:20:36.819 But the character is a little bit off to the left, right? 381 00:20:36.819 --> 00:20:39.619 Then, instead of capturing the entire body like this 382 00:20:39.619 --> 00:20:44.169 The camera captures from the thighs below the buttocks 383 00:20:45.369 --> 00:20:48.069 But since we are holding the whole thing now 384 00:20:48.069 --> 00:20:51.339 I will change this slightly 385 00:20:51.339 --> 00:20:55.339 So, when you go to the BP Third Person character's viewport window 386 00:20:55.339 --> 00:21:01.280 The camera boom is capturing this character 387 00:21:01.280 --> 00:21:03.330 From too far 388 00:21:03.330 --> 00:21:08.219 So, I'm going to change its position a bit 389 00:21:08.219 --> 00:21:13.669 After selecting Camera Boom, in the Detail, and Transform 390 00:21:13.669 --> 00:21:18.819 And in Location, I will set the y value to 40 391 00:21:18.819 --> 00:21:21.419 And the z value to 60 392 00:21:21.419 --> 00:21:29.260 Then, it will be located slightly above the right shoulder 393 00:21:29.739 --> 00:21:32.439 Then, you have to get a little closer 394 00:21:32.439 --> 00:21:37.660 But if you look at the camera rather than pulling the rotation itself 395 00:21:37.660 --> 00:21:40.260 In Detail's Camera category 396 00:21:40.260 --> 00:21:42.210 There is something called Target Arm Length 397 00:21:42.210 --> 00:21:46.859 This Spring Arm's length, this red line 398 00:21:46.859 --> 00:21:49.409 It's what determines the length 399 00:21:49.409 --> 00:21:51.659 I will set this to around 150 400 00:21:51.659 --> 00:21:53.180 Then the camera captures close like this 401 00:21:53.180 --> 00:21:57.480 The structure allows you to capture the character form this distance 402 00:21:57.480 --> 00:22:00.579 After, I will press the compile button 403 00:22:00.579 --> 00:22:03.729 If you go and play again, what happens? 404 00:22:03.729 --> 00:22:05.579 From the thigh to here 405 00:22:05.579 --> 00:22:07.579 Slightly off-center to the left 406 00:22:07.579 --> 00:22:09.300 It goes like this 407 00:22:09.300 --> 00:22:12.180 Shall we move like this? 408 00:22:13.380 --> 00:22:15.230 I'll do just like this 409 00:22:15.230 --> 00:22:20.819 I think it would be good to modify a little bit more on how you feel 410 00:22:20.819 --> 00:22:24.469 Good, I did like this 411 00:22:24.469 --> 00:22:30.140 I will change the default option values and move it to a C class 412 00:22:30.140 --> 00:22:34.640 Because this Blueprint is a bit less stable 413 00:22:34.640 --> 00:22:37.890 When produced based on C Project 414 00:22:37.890 --> 00:22:41.060 There are some cases where the Blueprint disappears 415 00:22:41.060 --> 00:22:45.160 So, if you move these data to C 416 00:22:45.160 --> 00:22:49.210 Even if the blueprint is lost, because the original C file is there 417 00:22:49.210 --> 00:22:51.979 It is very easy to restore it 418 00:22:51.979 --> 00:22:56.779 I will move the contents of this Blueprint into C 419 00:22:56.779 --> 00:23:00.900 There is a plugin called Visual Assist 420 00:23:00.900 --> 00:23:03.400 By default in Visual Studio 421 00:23:03.400 --> 00:23:05.800 I have installed it and am working on it 422 00:23:05.800 --> 00:23:09.469 In the case of the basic trial version, it's available for free 423 00:23:09.469 --> 00:23:12.769 If you install and use a web extension plugin 424 00:23:12.769 --> 00:23:15.319 That supports code auto-completion as needed 425 00:23:15.319 --> 00:23:18.800 You can make content more conveniently 426 00:23:18.800 --> 00:23:22.400 Especially in Unreal Projects 427 00:23:22.400 --> 00:23:26.619 Some variables, function names, and class names are quite long 428 00:23:26.619 --> 00:23:29.719 It's a bit difficult to memorize everything 429 00:23:29.719 --> 00:23:34.479 So, it would be good to use more plugins that provide auto-completion 430 00:23:34.479 --> 00:23:38.679 In order to move the Bluprinted work here 431 00:23:38.679 --> 00:23:41.079 NetTPSCharacter.cpp 432 00:23:41.079 --> 00:23:46.340 I will open it in Solution Explorer 433 00:23:49.579 --> 00:23:54.029 If you look, there is NetTPSCharacter.cpp in Solution Explorer 434 00:23:54.029 --> 00:23:58.380 Just select it 435 00:23:59.380 --> 00:24:04.030 Then, if you scroll down a bit, there's Constructor here 436 00:24:04.030 --> 00:24:07.780 In the Constructor, there is Get Character Movement 437 00:24:07.780 --> 00:24:09.680 That is, we get the Character Movement Component 438 00:24:09.680 --> 00:24:14.630 The Orient Rotation to Movement option is 439 00:24:14.630 --> 00:24:20.049 Changed earlier 440 00:24:20.049 --> 00:24:21.899 When we do rotation 441 00:24:21.899 --> 00:24:25.500 I set Orient Rotation to Movement to false 442 00:24:25.500 --> 00:24:28.100 Then, Use Controller Desired Rotation 443 00:24:28.100 --> 00:24:30.450 was checked, set to true 444 00:24:30.450 --> 00:24:33.260 I will apply this part 445 00:24:33.260 --> 00:24:36.699 I'll set this to false 446 00:24:37.540 --> 00:24:40.060 Next 447 00:24:40.900 --> 00:24:46.800 For B-Use Controller Desired Rotation 448 00:24:46.800 --> 00:24:51.339 I'll set the value true 449 00:24:51.339 --> 00:24:56.089 B-Use Controller Desired Rotation's value to true 450 00:24:56.089 --> 00:24:58.380 Change like this 451 00:24:58.380 --> 00:25:03.430 Then, we modified the camera's length and place values 452 00:25:03.430 --> 00:25:07.660 So, to modify the camera's value, this is Camera Boom 453 00:25:07.660 --> 00:25:11.560 Spring Arm Component, I will modify this 454 00:25:11.560 --> 00:25:17.699 Here, the Target Arm Length is set to 400, but I will change it into 150 455 00:25:17.699 --> 00:25:22.199 I will change into 150, and then modify the place value 456 00:25:22.199 --> 00:25:26.249 Place value is, at Camera Boom 457 00:25:26.249 --> 00:25:31.859 Set Relative Location 458 00:25:31.859 --> 00:25:33.960 At F-Vector 459 00:25:35.500 --> 00:25:40.000 To conveniently get for tip 460 00:25:40.000 --> 00:25:41.699 It is more convenient in this way 461 00:25:41.699 --> 00:25:45.699 There is Location at Camera Boom's Target 462 00:25:45.699 --> 00:25:49.449 If you bring this value as is if there are decimal points 463 00:25:49.449 --> 00:25:52.180 It is inconvenient to move them one by one 464 00:25:52.180 --> 00:25:55.980 If you right click, you will find a copy 465 00:25:55.980 --> 00:26:00.130 Select copy, and F-Vector 466 00:26:00.130 --> 00:26:03.219 Don't open it horizontally, and it will also be copied horizontally 467 00:26:03.219 --> 00:26:08.300 Press Ctrl V to paste 468 00:26:08.300 --> 00:26:12.100 I don't need things like X here 469 00:26:12.100 --> 00:26:14.050 I'll leave it as 0 here 470 00:26:14.050 --> 00:26:20.060 Delete the part of Y, set it as 40 471 00:26:20.060 --> 00:26:24.819 And add Z like this 472 00:26:25.699 --> 00:26:27.550 Right? 473 00:26:27.550 --> 00:26:32.300 In this way, the position of the Camera Boom was determined 474 00:26:32.339 --> 00:26:35.789 I will click Build here first 475 00:26:35.789 --> 00:26:39.339 When you click Build 476 00:26:39.339 --> 00:26:44.189 The output below from Visual Studio show that 477 00:26:44.839 --> 00:26:47.689 The Build failed 478 00:26:47.689 --> 00:26:50.030 Can you see this? 479 00:26:52.230 --> 00:26:54.980 Output, if you look at this option 480 00:26:54.980 --> 00:26:57.830 You can see that the build failed 481 00:26:57.830 --> 00:27:00.180 Let me enlarge the screen a little and show you 482 00:27:00.180 --> 00:27:03.939 It says 0 builds succeeded and 1 failed 483 00:27:03.939 --> 00:27:06.989 This is because of an option called Live Coding 484 00:27:06.989 --> 00:27:10.059 That was added starting with Unreal Engine 5 485 00:27:10.059 --> 00:27:16.900 If you go to Unreal Editor adding to the bottom right 486 00:27:18.350 --> 00:27:24.850 There is a compile button here, right? 487 00:27:24.850 --> 00:27:27.540 If you click this, it will compile automatically 488 00:27:27.540 --> 00:27:29.090 Here is Live Coding 489 00:27:29.090 --> 00:27:30.990 If Enable Live Coding is checked 490 00:27:30.990 --> 00:27:32.499 It means you will use it 491 00:27:32.499 --> 00:27:34.999 It's already compiling 492 00:27:34.999 --> 00:27:36.649 But Visual Studio is trying to do it again 493 00:27:36.649 --> 00:27:40.049 So the part where this conflict occurs an error 494 00:27:40.049 --> 00:27:43.699 It may vary depending on your work style 495 00:27:43.699 --> 00:27:45.999 But some people compile here 496 00:27:45.999 --> 00:27:48.699 While others compile in Visual Studio 497 00:27:48.699 --> 00:27:52.299 If errors occur in Visual Studio while working on code 498 00:27:52.299 --> 00:27:54.380 It may be more convenient to fix it there 499 00:27:54.380 --> 00:27:57.650 So, I will turn off Enable Live Coding 500 00:28:00.408 --> 00:28:03.158 I will turn off the Enable Live Coding 501 00:28:03.158 --> 00:28:08.780 If you do this and go back to Visual Studio and build again 502 00:28:08.780 --> 00:28:13.329 You will see that it builds normally this time 503 00:28:15.509 --> 00:28:18.909 Then, it says that 1 build was successful and 0 was failed 504 00:28:18.909 --> 00:28:24.879 When this happens, it is reflected properly in the Unreal Editor 505 00:28:25.979 --> 00:28:30.679 The NetTPS character has been modified 506 00:28:30.679 --> 00:28:35.260 For this NetTPS character to work in our project 507 00:28:35.260 --> 00:28:37.460 A few more settings need to be made 508 00:28:37.460 --> 00:28:39.560 That I've successfully built it like this? 509 00:28:39.560 --> 00:28:43.939 What happens now? Suddenly, our character disappeared 510 00:28:43.939 --> 00:28:47.189 This is because there are some changes 511 00:28:47.189 --> 00:28:49.239 In the settings now 512 00:28:49.239 --> 00:28:51.459 That chnged as we moved the folder 513 00:28:51.459 --> 00:28:55.059 But you will probably run into a similar situation in your settings 514 00:28:55.059 --> 00:28:56.979 I'm going to set this again 515 00:28:56.979 --> 00:28:59.079 At Setting - World Setting 516 00:28:59.079 --> 00:29:02.260 There is NetTPS Game Mode 517 00:29:02.260 --> 00:29:04.860 Right? 518 00:29:04.860 --> 00:29:10.310 At NetTPS Game Mode 519 00:29:10.310 --> 00:29:15.260 It is set to Fun Class as a default 520 00:29:15.260 --> 00:29:18.960 So, instead of our BP Third Person character appearing 521 00:29:18.960 --> 00:29:22.210 This class in the Default Fun Class is 522 00:29:22.210 --> 00:29:26.099 Set to appear 523 00:29:26.099 --> 00:29:28.449 So, I'll modify this part a little 524 00:29:28.449 --> 00:29:31.399 So, let's work on NetTPS Game Mode here 525 00:29:31.399 --> 00:29:34.100 By creating it as a Blueprint 526 00:29:34.200 --> 00:29:35.050 Where is it? 527 00:29:35.050 --> 00:29:37.900 You can move this over there 528 00:29:37.900 --> 00:29:41.260 But if you go inside the C Class Folder 529 00:29:41.260 --> 00:29:45.660 In the Content Browser, click on the NetTPS folder 530 00:29:45.660 --> 00:29:51.260 Then, Public, if you look here, we have the NetTPS Game Mode Class 531 00:29:51.260 --> 00:29:54.010 This is C Class 532 00:29:54.010 --> 00:29:56.160 Let's make this a Blueprint 533 00:29:56.160 --> 00:30:01.140 Register it using our NetTPS character Blueprint 534 00:30:01.140 --> 00:30:03.540 Right click this 535 00:30:03.540 --> 00:30:05.790 Create Blueprint Class 536 00:30:05.790 --> 00:30:08.340 Based on NetTPS Game Mode 537 00:30:08.340 --> 00:30:10.939 I will click this 538 00:30:10.939 --> 00:30:15.989 It means, I will make this class into Blueprint 539 00:30:15.989 --> 00:30:20.699 I'll name it BP_ 540 00:30:20.780 --> 00:30:23.130 Next, for the path loction to be created 541 00:30:23.130 --> 00:30:26.680 We will make this class 542 00:30:26.680 --> 00:30:29.390 In the Blueprint folder in NetTPS 543 00:30:30.459 --> 00:30:34.859 When you do Create Blueprint Class like this 544 00:30:35.739 --> 00:30:39.339 The Blueprint Editor window opens 545 00:30:39.339 --> 00:30:43.039 The BP_NetTPS Game Mode Blueprint 546 00:30:43.039 --> 00:30:47.890 And the Default Fun Class are here are will be used now 547 00:30:47.890 --> 00:30:54.660 I will change this into BP_Third Person Character 548 00:30:54.660 --> 00:30:57.360 I changed into BP_Third Person Character 549 00:30:57.360 --> 00:31:01.660 Then, compile 550 00:31:01.660 --> 00:31:05.160 Again, come back to Main Mode 551 00:31:05.160 --> 00:31:07.760 And I'm going to change Game Mode Override 552 00:31:07.760 --> 00:31:10.510 At Worldsetting which is written Game Mode Override 553 00:31:10.510 --> 00:31:13.020 Into BP_NetTPS Game Mode 554 00:31:13.020 --> 00:31:14.920 Then, here, at Default Fun Class 555 00:31:14.920 --> 00:31:18.540 The things we registered are in normally 556 00:31:18.540 --> 00:31:20.390 If you can't see the World Setting properly 557 00:31:20.390 --> 00:31:22.890 You can click World Setting, here at Setting 558 00:31:22.890 --> 00:31:26.490 When you click the Play button again 559 00:31:26.490 --> 00:31:31.509 BP_Third Person Character pops out normally 560 00:31:31.619 --> 00:31:34.269 It's done 561 00:31:34.269 --> 00:31:39.419 So far, I've created the project settings 562 00:31:39.419 --> 00:31:40.619 Then do setting 563 00:31:40.619 --> 00:31:44.780 And even created a Third Person Player mode 564 00:31:44.780 --> 00:31:48.870 Let's summarize what we learned in this lecture 565 00:31:49.390 --> 00:31:51.540 Creating and Setting Up C Based Project Use the ThirdPerson template and create a C based NetTPS using the Unreal Engine launcher 566 00:31:51.540 --> 00:31:53.390 Created a structure that divides the Source folder into Public and Private folders and saves them as .h files and .cpp files, respectively Created Unreal Editor's project folder 567 00:31:53.390 --> 00:31:54.890 Set Always on Top and Late Joining options in the Edit Preferences window for a network multiplayer work environment 568 00:31:54.890 --> 00:31:56.090 Set Play Mode to Play As Listen Server 569 00:31:56.090 --> 00:31:59.740 Creating Third Person Player Enable Use Controller Desired Rotation in the CharacterMovement component to change the Third Person player's rotation settings 570 00:31:59.740 --> 00:32:03.390 Set the position of the Third Person camera Modified Game Mode and World Settings