1
00:00:01,740 --> 00:00:05,720
So let's go ahead and add a rifle to our player for that.

2
00:00:05,730 --> 00:00:13,110
If we open up the player main game object, then inside the manager, let's open up hips, then spine,

3
00:00:13,110 --> 00:00:21,900
then spine, one spine to then open up the right shoulder, then the right arm, right forearm, then

4
00:00:21,900 --> 00:00:22,980
right hand.

5
00:00:23,310 --> 00:00:32,220
Then in the right hand open this right hand, thumb one, then the thumb to then the right hand, thumb

6
00:00:32,220 --> 00:00:33,480
three, then four.

7
00:00:33,630 --> 00:00:36,360
And right here in the right hand, thumb four.

8
00:00:36,360 --> 00:00:44,340
And we will create a new empty game object by the name of a rifle holder.

9
00:00:45,360 --> 00:00:48,150
Press enter after this.

10
00:00:48,150 --> 00:00:55,410
Let's close this right shoulder for now and open up the left shoulder, then left arm, left forearm,

11
00:00:55,410 --> 00:01:00,960
left hand, then left hand, thumb, one thumb to Tom three, four.

12
00:01:00,960 --> 00:01:02,220
And then in the four.

13
00:01:03,060 --> 00:01:10,410
And let's create empty game object by the name of rifle holder as well, because our player will be

14
00:01:10,410 --> 00:01:12,960
holding two guns at the same time.

15
00:01:12,960 --> 00:01:17,460
So we need two rifle holders in both of the arms of the player.

16
00:01:17,970 --> 00:01:22,620
So now let's minimize the left shoulder as well and open up the right shoulder.

17
00:01:22,620 --> 00:01:24,450
There is the rifle holder.

18
00:01:24,690 --> 00:01:27,960
So let's go ahead and click on guns folder.

19
00:01:27,960 --> 00:01:36,750
And in the guns go inside three fab ten gun models and here is all of the guns or you can say rifles.

20
00:01:36,750 --> 00:01:43,110
So first of all, we will add our gun, okay, in the right hand of the player.

21
00:01:43,110 --> 00:01:48,720
So just drag and drop it inside the rifle holder, then click on prefab and pack completely.

22
00:01:50,070 --> 00:01:57,000
And in the next last video, you guys notice that we have added the gun animator to our player.

23
00:01:57,030 --> 00:02:02,490
Okay, if we check the resources, we have created the gun animator in the previous video.

24
00:02:02,610 --> 00:02:04,980
So now we have added the gun.

25
00:02:05,340 --> 00:02:13,140
As you can see, we have the gun animator added and basically this will play the first animation, which

26
00:02:13,140 --> 00:02:13,680
is this one.

27
00:02:13,680 --> 00:02:16,350
Okay, so let's go ahead and play the game.

28
00:02:19,570 --> 00:02:23,260
And as you can see, it played this shooting animation.

29
00:02:23,260 --> 00:02:26,230
You can see the player is in the shooting animation.

30
00:02:26,560 --> 00:02:27,250
Okay.

31
00:02:27,250 --> 00:02:35,770
So now if we click on our gun and then get back to the scene view so that we can position our rifle

32
00:02:36,100 --> 00:02:37,450
or you can say gun.

33
00:02:37,750 --> 00:02:45,650
So what we will do is to now simply make this gun position accurately.

34
00:02:45,670 --> 00:02:49,600
So you can do the same as I am doing.

35
00:02:49,600 --> 00:02:57,100
If your character and rifles are different than make sure that you do it at according to your own game.

36
00:02:57,100 --> 00:02:57,540
Okay.

37
00:02:57,610 --> 00:03:01,390
So let me just quickly do that and then I will show it to you.

38
00:03:28,630 --> 00:03:31,450
So I think this looks good in the player arms.

39
00:03:31,450 --> 00:03:35,100
As you can see, it looks good like this.

40
00:03:36,070 --> 00:03:41,500
And as you can see, the player is holding the gun, as you can see.

41
00:03:42,130 --> 00:03:45,730
So now first gun is set accurately.

42
00:03:45,730 --> 00:03:51,610
Now let's do this for the other hand as well, because our player will be holding two different guns.

43
00:03:51,620 --> 00:03:58,390
So in the left shoulder, left arm, forearm, hand, then left hand, thumb, one, two, three, four.

44
00:03:58,390 --> 00:04:02,440
And in the four last we have the rifle holder.

45
00:04:03,580 --> 00:04:10,870
So what we can do is to simply duplicate this one and then drag and drop it inside the rifle holder

46
00:04:10,870 --> 00:04:11,890
of the other hand.

47
00:04:12,640 --> 00:04:17,020
And then let's move the position of this gun to this hand.

48
00:04:18,250 --> 00:04:21,970
And now let's position it correctly as well.

49
00:04:41,780 --> 00:04:45,710
So as you can see, it looks perfect like this.

50
00:04:46,580 --> 00:04:50,150
We have both of the set correctly, as you can see.

51
00:04:51,290 --> 00:04:59,600
Now, guys, don't stop the game because as you know that we are playing the game so that our player

52
00:05:00,170 --> 00:05:03,530
will be in the shooting animation and then we will set the guns.

53
00:05:03,530 --> 00:05:06,340
As you can see right here, we set it already.

54
00:05:06,350 --> 00:05:08,020
Okay, now don't close the game.

55
00:05:08,030 --> 00:05:12,600
First of all, notice these values of both of the guns.

56
00:05:13,400 --> 00:05:16,700
Because if you stop the game, these values will be gone.

57
00:05:16,970 --> 00:05:18,590
So just don't stop the game.

58
00:05:19,190 --> 00:05:24,950
If you are using windows, then open up the snipping tool or you can use your mobile phone and just

59
00:05:24,950 --> 00:05:26,150
capture these values.

60
00:05:26,150 --> 00:05:26,560
Okay.

61
00:05:26,810 --> 00:05:30,700
Or else you can do this is simply copy the component.

62
00:05:30,710 --> 00:05:31,250
Okay?

63
00:05:31,250 --> 00:05:36,950
But since we have two different guns, so we need to take a screenshot of one of the gun.

64
00:05:36,950 --> 00:05:40,580
So I will take the screenshot or screenshot of this left hand gun.

65
00:05:40,580 --> 00:05:41,090
Okay.

66
00:05:41,150 --> 00:05:47,420
So what I would do is to simply click on you and let me capture these.

67
00:05:47,420 --> 00:05:47,780
Okay.

68
00:05:47,780 --> 00:05:51,260
So now as you can see, we have a screenshot of the left hand gun.

69
00:05:51,410 --> 00:05:58,190
And for the right hand, what we can do is to simply copy the component values of it, or you can actually

70
00:05:58,640 --> 00:06:00,740
take a screenshot of this one as well.

71
00:06:00,740 --> 00:06:04,150
But I will simply click on copy component.

72
00:06:04,160 --> 00:06:12,800
Now, if we stop the game, you will notice that our gun is gone and our gun position is now gone as

73
00:06:12,800 --> 00:06:13,280
well.

74
00:06:13,280 --> 00:06:15,500
So we have the right hand gun.

75
00:06:15,500 --> 00:06:18,680
So what we will do, we will simply paste the values.

76
00:06:19,160 --> 00:06:24,920
As you can see, the values is being paste, okay, you can notice it.

77
00:06:25,910 --> 00:06:32,150
And now what we can do is to actually duplicate this again and move it inside the rifle holder.

78
00:06:32,150 --> 00:06:36,080
Okay, so drag and drop it inside the rifle holder.

79
00:06:36,740 --> 00:06:40,520
Now we have these values, so let's type these values.

80
00:06:40,730 --> 00:06:47,960
So for the position X, it was -0.05, six four.

81
00:06:47,990 --> 00:06:57,470
And then for the other one it was it was -0.04 to 4.

82
00:06:58,550 --> 00:07:07,040
And then for the Z it was -0.0416.

83
00:07:07,070 --> 00:07:10,280
Okay then let's change the rotation of it as well to

84
00:07:10,520 --> 00:07:15,590
-55.011.

85
00:07:15,590 --> 00:07:16,460
Let's change this.

86
00:07:16,460 --> 00:07:18,320
The X rotation to

87
00:07:18,350 --> 00:07:24,230
212.939

88
00:07:24,680 --> 00:07:31,670
and then this one do 63.569

89
00:07:32,660 --> 00:07:35,750
and now everything is set up already.

90
00:07:35,750 --> 00:07:42,800
Okay, so now what we can do is to play the game again and now you will notice the guns will be in the

91
00:07:42,800 --> 00:07:50,690
same direction in which we have added, as you can see, if we check the same view, there are the guns

92
00:07:52,430 --> 00:07:53,960
already being set up now.

93
00:07:54,350 --> 00:08:02,450
So what what you have to do is to simply add the animator, okay, to the player right here and then

94
00:08:02,450 --> 00:08:08,780
play the game and set up all of your guns in one position, as you saw in this video.

95
00:08:08,780 --> 00:08:15,710
And after setting it correctly, copy the values or you can actually take a screenshot of it and then

96
00:08:15,710 --> 00:08:27,470
paste that values again when the game is being stopped so that the values say, okay, so now we have

97
00:08:27,470 --> 00:08:30,720
the guns added, okay?

98
00:08:32,270 --> 00:08:38,230
And the next thing which we need to do is to add some shooting to our rifles.

