﻿1
00:00:04,240 --> 00:00:10,540
‫So this is just going to be a quick lecture on trying to understand why we're getting this weird glitch

2
00:00:10,540 --> 00:00:14,290
‫here when we move from the right of this first spawn point.

3
00:00:14,650 --> 00:00:18,280
‫Now, let's dive straight into this one without an introduction.

4
00:00:18,310 --> 00:00:25,180
‫The idea here is that something must be going wrong with the collisions, collisions being those simplified

5
00:00:25,180 --> 00:00:30,250
‫meshes around the world that allow us to do physical, physical calculations.

6
00:00:30,250 --> 00:00:31,390
‫Basically, what can we stand on?

7
00:00:31,390 --> 00:00:32,250
‫What can we not?

8
00:00:32,260 --> 00:00:38,410
‫Because they're often simplifications of the meshes that we can actually see for performance reasons.

9
00:00:38,590 --> 00:00:42,670
‫So how do we see what the collision world looks like?

10
00:00:42,670 --> 00:00:49,570
‫Well, fortunately, in our viewport we can go to the lit mode, the button that by default says lit

11
00:00:49,600 --> 00:00:50,710
‫at the top left.

12
00:00:51,100 --> 00:00:53,350
‫And you can see as different view modes here.

13
00:00:53,620 --> 00:00:57,670
‫Some of them are things like unlit removes the lighting.

14
00:00:57,670 --> 00:01:03,850
‫You can see the wireframes of the meshes, but the one we're interested in is either the player collision

15
00:01:03,850 --> 00:01:06,630
‫or the visibility collision.

16
00:01:06,640 --> 00:01:13,480
‫Now the difference being that the visibility collision is the more fine grained meshes and the player

17
00:01:13,480 --> 00:01:17,110
‫collision is that coarser grain mesh and you can kind of see the difference there.

18
00:01:17,110 --> 00:01:18,400
‫I think that's quite obvious.

19
00:01:18,400 --> 00:01:22,480
‫When you click between the two, you can see the coarse grain and fine grain nature of things.

20
00:01:22,480 --> 00:01:29,410
‫But if we move over here from this particular angle, you can see that there is a mesh just poking through

21
00:01:29,440 --> 00:01:31,960
‫here, a collision mesh that we do not want.

22
00:01:31,960 --> 00:01:33,310
‫Where is that coming from?

23
00:01:33,310 --> 00:01:36,010
‫Looks like an error in our asset pack.

24
00:01:36,220 --> 00:01:40,810
‫If we click on it, you can see it says floor filler 27.

25
00:01:41,350 --> 00:01:42,190
‫Not very helpful.

26
00:01:42,190 --> 00:01:43,450
‫That's the name of the actor.

27
00:01:43,450 --> 00:01:51,040
‫But if we go and have a look at its static mesh component and the details pane and have a look at its

28
00:01:51,040 --> 00:01:54,910
‫actual static mesh, we've got the SM stairs, a one.

29
00:01:55,150 --> 00:02:01,690
‫Now if we browse to this asset using the little magnifying glass and open it up, then we're going to

30
00:02:01,690 --> 00:02:05,530
‫get the static mesh editor opened up in Unreal.

31
00:02:06,010 --> 00:02:09,250
‫And what we're interested in is having a look at collisions.

32
00:02:09,250 --> 00:02:15,880
‫So to see collisions, you go to this collisions button and you can click on both the simple and complex

33
00:02:15,880 --> 00:02:18,550
‫collision that shows you there's two different measures here.

34
00:02:18,550 --> 00:02:25,450
‫The complex collision is for when we're doing finer grain physics and is often the same as the visible

35
00:02:25,450 --> 00:02:26,140
‫mesh.

36
00:02:26,470 --> 00:02:31,900
‫And then there's the simple collision, which is just a kind of course of grain version, as we've been

37
00:02:31,900 --> 00:02:32,530
‫saying.

38
00:02:32,530 --> 00:02:35,830
‫And you can kind of see that difference there as a nice coarse grain mesh.

39
00:02:36,250 --> 00:02:41,950
‫And what happens if we have a look, if we've got this coarse grain, simple collision selected and

40
00:02:41,950 --> 00:02:47,560
‫go below the floor is you can see there's this massive strand going off down there into the distance.

41
00:02:47,560 --> 00:02:50,620
‫That must be what was causing us our collision issues.

42
00:02:50,620 --> 00:02:53,500
‫A little bit of an error in the asset pack.

43
00:02:54,140 --> 00:02:59,140
‫Few ways that we could deal with this one might be if you go to the collision menu, you can remove

44
00:02:59,140 --> 00:03:01,840
‫collision, which is entirely removing collisions.

45
00:03:01,840 --> 00:03:07,120
‫You can then regenerate it using a bunch of different options that are built into unreal, such as you

46
00:03:07,120 --> 00:03:12,990
‫can add a sphere for simplified collision, a capsule box ten DOP 26 DPI.

47
00:03:13,000 --> 00:03:13,900
‫Lots of different options here.

48
00:03:13,900 --> 00:03:15,400
‫Auto convex collision.

49
00:03:15,400 --> 00:03:18,970
‫We're not going to do any of that because actually we can fix this up pretty straightforwardly.

50
00:03:18,970 --> 00:03:19,240
‫Oh yeah.

51
00:03:19,240 --> 00:03:24,130
‫One more option would be that we could set the complex collision as the simple collision.

52
00:03:24,130 --> 00:03:29,020
‫There's an option for that in the details pane, but we're not going to go down any of those routes

53
00:03:29,020 --> 00:03:33,280
‫because actually you can do a little bit, of course, grain mesh editing right here.

54
00:03:33,310 --> 00:03:34,960
‫At least we can delete some vertices.

55
00:03:34,960 --> 00:03:40,810
‫So if we go ahead and select it while the collision mesh simple collision meshes visible, you can select

56
00:03:40,810 --> 00:03:45,520
‫this set of edges or the face that goes all the way down here.

57
00:03:45,520 --> 00:03:47,140
‫And you can see that's all that's selected.

58
00:03:47,140 --> 00:03:49,270
‫That's the only thing that's changed to a lighter green color.

59
00:03:49,270 --> 00:03:50,230
‫That's how you can tell.

60
00:03:50,230 --> 00:03:55,210
‫And if we add delete, then you can see that goes away and it doesn't actually affect the rest of the

61
00:03:55,210 --> 00:03:55,480
‫mesh.

62
00:03:55,480 --> 00:04:01,480
‫The rest of the mesh is pretty solid, still looks pretty much as we would want it to look.

63
00:04:01,810 --> 00:04:08,620
‫And if we go even in this viewport, we can go over to the player collision view and you can see what

64
00:04:08,620 --> 00:04:10,180
‫that mesh looks like.

65
00:04:10,180 --> 00:04:13,570
‫It's a little bit funny in places, but it will work.

66
00:04:13,570 --> 00:04:16,120
‫So if we go back to Lit.

67
00:04:18,000 --> 00:04:19,650
‫And then go over into the sandbox.

68
00:04:19,650 --> 00:04:23,520
‫You can see now that little shard has disappeared from our player.

69
00:04:23,520 --> 00:04:27,020
‫Collisions can go back into lit and hit play.

70
00:04:27,030 --> 00:04:33,330
‫And now if I go over to the right and move around here, there are no collision errors whatsoever.

71
00:04:33,330 --> 00:04:39,120
‫And because we modified that stair mesh, let's go down the hallway and try going up and down the stairs.

72
00:04:39,120 --> 00:04:39,390
‫Yep.

73
00:04:39,390 --> 00:04:41,520
‫The collisions there still seem to be functional.

74
00:04:41,520 --> 00:04:43,860
‫I'm not dropping through the floor or anything.

75
00:04:43,860 --> 00:04:48,150
‫I'm able to go up them and it's not a kind of discontinuous jerky motion.

76
00:04:48,150 --> 00:04:54,540
‫So Astaire mesh is now fixed and you've learned as a result of it a little bit about how collisions

77
00:04:54,540 --> 00:04:58,260
‫are set up against static meshes in Unreal.

78
00:04:58,800 --> 00:05:04,110
‫The next lecture we're going to be going back to animations and understanding the animation blueprint

79
00:05:04,110 --> 00:05:07,110
‫to create much more complicated animation behaviors.

80
00:05:07,110 --> 00:05:08,130
‫I will see you there.

