1
00:00:00,000 --> 00:00:02,000
I know guys in this video want to offer you a challenge.

2
00:00:02,000 --> 00:00:03,000
All right.

3
00:00:03,000 --> 00:00:04,000
It's going to be pretty simple.

4
00:00:04,000 --> 00:00:07,000
If you watched last video carefully, I'm sure you will be able to do it.

5
00:00:07,000 --> 00:00:10,000
But if you cannot do it, please don't worry about it.

6
00:00:10,000 --> 00:00:11,000
It's just it's fine.

7
00:00:11,000 --> 00:00:12,000
I'm going to show you how to do that.

8
00:00:12,000 --> 00:00:14,000
So I'm going to explain the task.

9
00:00:14,000 --> 00:00:16,000
Now, you know how to use Blind tree.

10
00:00:16,000 --> 00:00:21,000
And actually there is a way to make this animator a bit cleaner and a bit better for us.

11
00:00:21,000 --> 00:00:25,000
It's going to use less parameters and it will be a bit cleaner in the code as well.

12
00:00:25,000 --> 00:00:32,000
So I want you to use blend three for this idle and move animation instead of these two we have.

13
00:00:32,000 --> 00:00:37,000
So it will have just one bland tree and transition between idle and move will be inside.

14
00:00:37,000 --> 00:00:38,000
All right.

15
00:00:38,000 --> 00:00:40,000
Again, I'll explain this again.

16
00:00:40,000 --> 00:00:46,000
You need to make a blend tree for idle and move animation and yeah, that's it.

17
00:00:47,000 --> 00:00:48,000
Just do it.

18
00:00:48,000 --> 00:00:50,000
I'm counting until two, and then I'm showing how to do it.

19
00:00:50,000 --> 00:00:51,000
One, two.

20
00:00:52,000 --> 00:00:56,000
Okay, so let's delete these two just like that.

21
00:00:56,000 --> 00:00:59,000
Brutally create new blend tree.

22
00:00:59,000 --> 00:01:04,000
We're going to name it as Idle move and let's go inside of.

23
00:01:05,000 --> 00:01:10,000
We need a new parameter for this because we have only one velocity, so let's create one.

24
00:01:11,000 --> 00:01:13,000
Float x velocity.

25
00:01:15,000 --> 00:01:20,000
Then choose x velocity over here and we're going to add motion field.

26
00:01:22,000 --> 00:01:23,000
I know.

27
00:01:23,000 --> 00:01:25,000
And we're going to add motion field.

28
00:01:27,000 --> 00:01:27,000
More.

29
00:01:29,000 --> 00:01:30,000
We could leave out to my threshold.

30
00:01:30,000 --> 00:01:35,000
But I think it's better to keep everything under tight control when you need specific behavior.

31
00:01:36,000 --> 00:01:37,000
So let's uncheck this.

32
00:01:37,000 --> 00:01:41,000
And threshold for Idol will be zero and for the move.

33
00:01:41,000 --> 00:01:47,000
It's going to be not one, but let's make let's say .0.1.

34
00:01:47,000 --> 00:01:50,000
Let's see how it works, because I'm not sure I don't remember.

35
00:01:50,000 --> 00:01:52,000
Now we have this term, now we have it.

36
00:01:52,000 --> 00:01:57,000
Let's make it as a default, and then we're going to make new transition back from full.

37
00:01:57,000 --> 00:02:02,000
To move like that with the condition is grounded.

38
00:02:02,000 --> 00:02:02,000
True.

39
00:02:03,000 --> 00:02:05,000
And check exit time, duration zero.

40
00:02:05,000 --> 00:02:08,000
We have that, but it's not done yet.

41
00:02:08,000 --> 00:02:12,000
We need to change this x velocity of the animator in the code.

42
00:02:12,000 --> 00:02:16,000
Let's go back and now we can delete this boolean is running.

43
00:02:17,000 --> 00:02:18,000
We don't need it.

44
00:02:18,000 --> 00:02:25,000
We can delete this line of code and we can delete this line of code and just type over here.

45
00:02:26,000 --> 00:02:29,000
I'll do it above because X goes first all the time.

46
00:02:29,000 --> 00:02:35,000
Anim set float of x velocity to rb velocity dot x.

47
00:02:36,000 --> 00:02:40,000
Save it, going to delete these spaces and let's go and see how it works.

48
00:02:40,000 --> 00:02:42,000
We are standing.

49
00:02:44,000 --> 00:02:47,000
If I'll run, I'm transferring to movement animation.

50
00:02:48,000 --> 00:02:50,000
Jump, fall.

51
00:02:50,000 --> 00:02:52,000
Move, Jump, fall, move!

52
00:02:52,000 --> 00:02:53,000
Wow.

53
00:02:54,000 --> 00:02:55,000
Very cool.

54
00:02:56,000 --> 00:02:57,000
I'm.

55
00:02:58,000 --> 00:03:00,000
I'm proud of you guys, and I'm proud of me.

56
00:03:00,000 --> 00:03:03,000
Now, let's see what we can do better here.

57
00:03:03,000 --> 00:03:05,000
And there is only one thing in my mind.

58
00:03:05,000 --> 00:03:06,000
I don't like this name.

59
00:03:06,000 --> 00:03:07,000
Run begun.

60
00:03:07,000 --> 00:03:09,000
I really don't like it.

61
00:03:09,000 --> 00:03:15,000
So I want to rename this, but if I'll just change my name like that, they file delete this and type

62
00:03:15,000 --> 00:03:16,000
new name.

63
00:03:16,000 --> 00:03:20,000
Let's say it will be later unlocked.

64
00:03:20,000 --> 00:03:23,000
Then I have an error here because name is different.

65
00:03:23,000 --> 00:03:30,000
This name doesn't exist anymore and now I need to change it here and I need to go change it here.

66
00:03:30,000 --> 00:03:31,000
Very big headache.

67
00:03:31,000 --> 00:03:32,000
So instead.

68
00:03:34,000 --> 00:03:35,000
We can use a hotkey.

69
00:03:35,000 --> 00:03:38,000
We need to select it and then press control.

70
00:03:38,000 --> 00:03:38,000
Ah.

71
00:03:38,000 --> 00:03:39,000
Ah.

72
00:03:39,000 --> 00:03:40,000
So.

73
00:03:40,000 --> 00:03:40,000
Ah.

74
00:03:40,000 --> 00:03:41,000
Twice.

75
00:03:41,000 --> 00:03:44,000
Now, if we change the name, it's going to be changed across the code.

76
00:03:45,000 --> 00:03:47,000
And let's type player.

77
00:03:48,000 --> 00:03:49,000
Unlocked.

78
00:03:50,000 --> 00:03:51,000
All right.

79
00:03:52,000 --> 00:03:52,000
I like it.

80
00:03:52,000 --> 00:03:53,000
Let's save it.

81
00:03:55,000 --> 00:03:56,000
Yeah, I think that's it for now.

82
00:03:56,000 --> 00:03:58,000
Let's go to the next video.

