﻿1
00:00:04,340 --> 00:00:05,390
‫Hello and welcome.

2
00:00:05,390 --> 00:00:10,430
‫In this lecture, we're going to be looking at how we can control our own character, how we can customize

3
00:00:10,430 --> 00:00:15,280
‫the mesh and fix a bug in the camera movement.

4
00:00:15,290 --> 00:00:17,990
‫Let's dive in and see how this is done.

5
00:00:18,620 --> 00:00:24,440
‫So let's look at customizing this character away from this boring default mannequin.

6
00:00:24,830 --> 00:00:30,380
‫Now, you might be tempted to go ahead and just customize the character here in the scene, but I would

7
00:00:30,380 --> 00:00:32,510
‫recommend that you don't do that.

8
00:00:32,510 --> 00:00:39,800
‫Instead, that we create a blueprint child class off of this third person character.

9
00:00:40,190 --> 00:00:47,390
‫And the way we can do that is by going over into the details pane and selecting the blueprint button

10
00:00:47,390 --> 00:00:51,440
‫and clicking the Create Child Blueprint class.

11
00:00:51,440 --> 00:00:57,920
‫So that allows us to add our own modifications on top of the character class that we've already brought

12
00:00:57,920 --> 00:00:58,340
‫in.

13
00:00:58,340 --> 00:01:08,720
‫So I'm going to call mine the BP underscore third person character, and I'm going to put this at the

14
00:01:08,720 --> 00:01:12,710
‫root of our content folder.

15
00:01:12,710 --> 00:01:17,870
‫So I'll click on the path and select content and then click okay.

16
00:01:18,140 --> 00:01:24,440
‫And then we're going to go ahead and click Select and that will open up our BP third person character

17
00:01:24,440 --> 00:01:26,540
‫and allow us to modify it.

18
00:01:26,570 --> 00:01:32,360
‫Now, one thing you will notice if you go ahead and play in the main level is that it doesn't actually

19
00:01:32,360 --> 00:01:34,070
‫start using our character.

20
00:01:34,070 --> 00:01:37,310
‫It spawns in its own character here.

21
00:01:37,310 --> 00:01:39,520
‫And that's because we've got a player start.

22
00:01:39,530 --> 00:01:41,480
‫Let's go ahead and delete that player start.

23
00:01:41,480 --> 00:01:47,030
‫But even if we do that, it's not enough to make us use the character we've brought in to the level.

24
00:01:47,030 --> 00:01:48,860
‫To do that, we have to signal to the engine.

25
00:01:48,860 --> 00:01:51,290
‫That's the character we want to use for our player.

26
00:01:51,290 --> 00:01:51,950
‫Zero.

27
00:01:52,280 --> 00:01:59,750
‫So if we go over to the blueprint for a second here, we're going to go in to the details pane and search

28
00:01:59,750 --> 00:02:05,240
‫for auto possess player and here it's currently set to disabled.

29
00:02:05,240 --> 00:02:12,080
‫I want to select player zero and that tells the engine that this character should be possessed automatically,

30
00:02:12,080 --> 00:02:15,440
‫should be controlled automatically by player zero.

31
00:02:15,440 --> 00:02:17,600
‫So let's go ahead and save that.

32
00:02:17,600 --> 00:02:19,850
‫Go ahead and play in the main level.

33
00:02:20,300 --> 00:02:23,270
‫And now you can see that I have got the character.

34
00:02:23,270 --> 00:02:29,540
‫His arm looks a little bit funky there because we're using the wrong mesh and I can't move left and

35
00:02:29,540 --> 00:02:30,710
‫right with my mouse.

36
00:02:30,710 --> 00:02:34,310
‫So let's sort out the left and right thing first.

37
00:02:34,310 --> 00:02:42,590
‫Now, the reason for this is that our inputs are slightly different to this character than those required

38
00:02:42,590 --> 00:02:45,710
‫or assumed by this starter kit.

39
00:02:46,130 --> 00:02:50,450
‫So what we need to do is edit the casual characters blueprint.

40
00:02:50,450 --> 00:02:56,840
‫So we're going to go into the content folder, the casual character folder, the blueprints.

41
00:02:56,840 --> 00:03:00,110
‫Then we're going to open the third person character.

42
00:03:00,110 --> 00:03:05,660
‫So this is a different blueprint to the third person that we've created off the back of it.

43
00:03:05,900 --> 00:03:11,360
‫And you will notice in here that there are a couple of compiler errors and you can click on the little

44
00:03:11,360 --> 00:03:16,460
‫looking glass or the little symbol next to the looking glass to find where these are.

45
00:03:16,490 --> 00:03:24,920
‫You can see that they're related to the turn rate axis event, which is basically how our turning has

46
00:03:24,920 --> 00:03:25,970
‫been set up.

47
00:03:26,090 --> 00:03:29,210
‫Now, we don't need to go into too much detail about what this is.

48
00:03:29,210 --> 00:03:30,230
‫You can see it's an event.

49
00:03:30,230 --> 00:03:37,820
‫It happens whenever you try and turn the mouse or you turn a controller and it is currently set up to

50
00:03:38,120 --> 00:03:40,910
‫something that is not configured for our project.

51
00:03:40,910 --> 00:03:48,710
‫So what we need to do is right click in an empty space and search for turn and you will find that there

52
00:03:48,710 --> 00:03:49,730
‫are some events here.

53
00:03:49,730 --> 00:03:55,490
‫There is an axis event called Turn Right, Right and turn right.

54
00:03:55,490 --> 00:04:01,370
‫We need the turn right rate at the top here to replace this current event and then we can move the pins

55
00:04:01,370 --> 00:04:07,550
‫that it's connected to by clicking control and dragging it onto the new pins to connect up to the new

56
00:04:07,550 --> 00:04:08,330
‫event.

57
00:04:08,330 --> 00:04:11,210
‫Then we can delete the event that has a warning attached to it.

58
00:04:11,210 --> 00:04:16,520
‫Move the old one in place and then there's one more warning for one called turn.

59
00:04:16,520 --> 00:04:18,650
‫We can right click an empty space again.

60
00:04:18,650 --> 00:04:24,710
‫Search for turn, find the event called Turn Right, which we're going to replace it with control.

61
00:04:24,710 --> 00:04:31,430
‫Click on the pins to move them over to the new event, delete the old and move it into place.

62
00:04:31,430 --> 00:04:38,390
‫So that's just updated this blueprint so that it works with the control scheme configured in the project.

63
00:04:38,390 --> 00:04:44,630
‫And if we go ahead and hit play now, you will notice that we can rotate the camera around and move

64
00:04:44,630 --> 00:04:46,310
‫as we would expect.

65
00:04:46,310 --> 00:04:50,150
‫So I'd like to challenge you to customize your character.

66
00:04:50,150 --> 00:04:54,320
‫You're going to do this by editing your BP third person characters.

67
00:04:54,320 --> 00:05:00,200
‫That's this one here, and particularly the mesh component in the components pane.

68
00:05:00,200 --> 00:05:06,830
‫You're going to select that and you're going to be using the details pane over here to select a skeletal

69
00:05:06,830 --> 00:05:08,630
‫mesh of your choosing.

70
00:05:08,750 --> 00:05:12,830
‫So go ahead and change the mesh to something that you prefer.

71
00:05:12,860 --> 00:05:16,180
‫Try out the different ones and see which one you want to use.

72
00:05:16,190 --> 00:05:17,990
‫Pause the video and have a go.

73
00:05:21,180 --> 00:05:21,630
‫Okay.

74
00:05:21,630 --> 00:05:22,650
‫Welcome back.

75
00:05:22,680 --> 00:05:29,130
‫So with this skeletal mesh property available, which again, we go to the mesh and components, then

76
00:05:29,130 --> 00:05:33,810
‫to the details pane down to the mesh section and there's a property called skeletal mesh.

77
00:05:33,810 --> 00:05:39,600
‫And then what you want to do is click the dropdown and have a little scroll through here to have a look

78
00:05:39,600 --> 00:05:40,950
‫at what meshes are available.

79
00:05:40,950 --> 00:05:48,210
‫Now, some of them come from the starter kit and some of them come from the character that we've brought

80
00:05:48,210 --> 00:05:49,680
‫in so I can select.

81
00:05:49,680 --> 00:05:54,120
‫There are a couple of pre-made, fully formed characters in here.

82
00:05:54,120 --> 00:05:58,020
‫One is just in his underwear and then there's some with different clothing on.

83
00:05:58,020 --> 00:06:03,390
‫I'm going to select number three and you can see here it comes in with some pretty cool looking sunglasses

84
00:06:03,390 --> 00:06:08,910
‫and we can go into our level and see that that character has indeed been updated over here, too.

85
00:06:08,910 --> 00:06:12,540
‫So if I go ahead and play, I can now play.

86
00:06:12,540 --> 00:06:19,070
‫As this character has run animations work correctly, his jump animations work just fine and the character

87
00:06:19,110 --> 00:06:21,420
‫camera movement works as well.

88
00:06:21,420 --> 00:06:22,410
‫Fantastic.

89
00:06:22,410 --> 00:06:24,780
‫Let's dive on to the next lecture.

