WEBVTT 1 00:00:23.500 --> 00:00:25.950 Let's learn how to link A VR head-mounted display device 2 00:00:25.950 --> 00:00:28.920 With a phone camera 3 00:00:28.920 --> 00:00:30.720 And a motion source 4 00:00:30.720 --> 00:00:33.970 That tracks the position of the VR controller in real-time 5 00:00:33.970 --> 00:00:36.440 Called Oculus Touch 6 00:00:36.440 --> 00:00:39.140 Once the equipment tracking setup is complete 7 00:00:39.140 --> 00:00:44.300 Let's practice receiving input values 8 00:00:44.300 --> 00:00:48.360 Such as press, touch, and axis of the VR controller 9 00:00:48.360 --> 00:00:50.740 When VR equipment is installed 10 00:00:50.740 --> 00:00:54.280 Checking the log displayed on the monitor is difficult 11 00:00:54.280 --> 00:00:56.630 So, we will use the test render component 12 00:00:56.630 --> 00:00:58.080 To output the controller's input value 13 00:00:58.080 --> 00:01:01.000 Directly on the world 14 00:01:01.216 --> 00:01:04.496 Creating a New Level 15 00:01:05.116 --> 00:01:09.246 Well, since this map we did last time was a test map 16 00:01:09.246 --> 00:01:13.440 We will now create an actual map to make 17 00:01:14.560 --> 00:01:17.610 Select New Level in the file 18 00:01:17.610 --> 00:01:20.460 To create a New Level 19 00:01:20.460 --> 00:01:23.560 The New Level will be based on the Basic level 20 00:01:23.560 --> 00:01:27.050 Let's select the Basic Level as the template 21 00:01:27.050 --> 00:01:31.560 And click the Create button to run it 22 00:01:34.800 --> 00:01:39.650 There's probably a bug right now 23 00:01:39.650 --> 00:01:42.420 Where the border here between heaven and earth is a little bit black right now 24 00:01:42.420 --> 00:01:44.480 In the case of the VR template 25 00:01:44.480 --> 00:01:49.480 If you look on the right here 26 00:01:49.480 --> 00:01:52.000 There will be an Exponential Height Fog 27 00:01:52.000 --> 00:01:56.020 If you select Exponential Height Fog 28 00:01:56.020 --> 00:01:59.400 And look at the bottom of the details section 29 00:01:59.400 --> 00:02:02.440 There is a line called Fog in Scattering Color 30 00:02:02.440 --> 00:02:05.290 So, the shape of the Fog InScattering Color section is 31 00:02:05.290 --> 00:02:07.520 Now black 32 00:02:07.520 --> 00:02:10.820 To make it a color similar to the sky 33 00:02:10.820 --> 00:02:15.520 Let's press the dropper mark and then select 34 00:02:15.520 --> 00:02:16.940 A color of the sky 35 00:02:16.940 --> 00:02:21.080 I'll try to use a darker blue if possible 36 00:02:23.220 --> 00:02:26.220 It feels a little too bright 37 00:02:26.220 --> 00:02:30.100 So I'll try making it a little darker 38 00:02:31.860 --> 00:02:35.960 I'm going to process it a little bit darker like this 39 00:02:36.700 --> 00:02:40.800 Then press the save button 40 00:02:40.800 --> 00:02:44.400 And right-click here to select New Folder 41 00:02:44.400 --> 00:02:46.000 Select New Folder 42 00:02:46.000 --> 00:02:51.050 With the name Maps 43 00:02:51.050 --> 00:02:55.300 Create a folder, and name it 44 00:02:56.000 --> 00:02:59.400 VRMainMap 45 00:02:59.400 --> 00:03:02.900 VRMainMap and save 46 00:03:02.900 --> 00:03:07.160 To save the level 47 00:03:07.160 --> 00:03:08.810 Knowing which game mode is applied 48 00:03:08.810 --> 00:03:11.600 to each new level is important 49 00:03:11.600 --> 00:03:17.850 So, in the content folder, Add, New Folder 50 00:03:17.850 --> 00:03:20.900 Create a new folder, and name it 51 00:03:20.900 --> 00:03:25.680 Blueprints 52 00:03:26.160 --> 00:03:30.110 Right-click in the Blueprint folder 53 00:03:30.110 --> 00:03:31.860 And select Blueprint Class 54 00:03:31.860 --> 00:03:35.860 To create a new Blueprint class 55 00:03:35.860 --> 00:03:37.710 Since we will create a game mode base 56 00:03:37.710 --> 00:03:39.910 We will designate the game mode base class 57 00:03:39.910 --> 00:03:42.640 As the parent class 58 00:03:42.640 --> 00:03:48.090 Let's name it 59 00:03:48.090 --> 00:03:50.960 BP_VRGameModeBase 60 00:03:50.960 --> 00:03:53.440 VRGameModeBase 61 00:03:54.260 --> 00:03:56.860 Next, right-click once more 62 00:03:56.860 --> 00:03:59.420 And create another Blueprint class 63 00:03:59.420 --> 00:04:02.320 This time, we will inherit the phone class 64 00:04:02.320 --> 00:04:06.000 That can be used as a player phone 65 00:04:06.000 --> 00:04:10.300 BP_HunetVRPlayer 66 00:04:10.300 --> 00:04:13.660 We will name it like this 67 00:04:13.660 --> 00:04:16.060 HunetVRPlayer 68 00:04:17.600 --> 00:04:21.200 Now, first, double-click on the VR game mode base you created earlier 69 00:04:21.200 --> 00:04:23.660 To open it 70 00:04:26.240 --> 00:04:30.500 In the Details panel on the right 71 00:04:30.500 --> 00:04:33.390 We will set the Default Pawn Class 72 00:04:33.390 --> 00:04:36.350 To the BP_HunetVRPlayer 73 00:04:36.350 --> 00:04:39.360 So that it will be the default player 74 00:04:39.960 --> 00:04:43.400 Compile and save 75 00:04:44.480 --> 00:04:47.980 Go to Project Settings 76 00:04:47.980 --> 00:04:52.000 At Maps and Modes 77 00:04:52.000 --> 00:04:54.100 The default game mode 78 00:04:54.100 --> 00:04:58.350 Change the BP_VRGameModeBase 79 00:04:58.350 --> 00:05:01.000 We just created 80 00:05:01.000 --> 00:05:05.200 Please check that the Default Pawn Class is 81 00:05:05.200 --> 00:05:08.300 BPHunetPlayer 82 00:05:08.300 --> 00:05:12.440 Here, both Editor StartUp Map and Game Default Map 83 00:05:12.880 --> 00:05:16.780 Will be changed into VR Main Map 84 00:05:16.780 --> 00:05:20.000 The VR main map we just created 85 00:05:20.929 --> 00:05:24.309 Creating a VR Player Pawn 86 00:05:25.600 --> 00:05:32.000 Open BP_HunetVRPlayer again 87 00:05:33.520 --> 00:05:35.820 In the case of player pawn 88 00:05:35.820 --> 00:05:39.200 It will have a scene route by default 89 00:05:39.200 --> 00:05:41.520 Next, acting as our eye 90 00:05:41.520 --> 00:05:44.000 We'll attach a camera component 91 00:05:44.000 --> 00:05:46.220 Camera 92 00:05:47.440 --> 00:05:48.840 Click the Add button 93 00:05:48.840 --> 00:05:51.790 Search for the camera 94 00:05:51.790 --> 00:05:56.000 And then add camera component 95 00:05:58.080 --> 00:06:00.480 In the case of the camera 96 00:06:00.500 --> 00:06:03.180 It has to serve as our field of view 97 00:06:03.180 --> 00:06:08.000 We'll place the screen right in the center here 98 00:06:09.840 --> 00:06:13.090 Next, after the camera component 99 00:06:13.090 --> 00:06:15.390 We will attach two motion controller components 100 00:06:15.390 --> 00:06:18.860 That act as controllers 101 00:06:18.860 --> 00:06:23.000 I will put one on my left hand and one on my right hand 102 00:06:24.180 --> 00:06:27.230 In the component panel, click the Add button 103 00:06:27.230 --> 00:06:30.190 And if you look at the bottom 104 00:06:30.630 --> 00:06:34.380 You will see a motion controller 105 00:06:35.580 --> 00:06:38.130 If you look here, it's called a motion controller 106 00:06:38.130 --> 00:06:41.880 If you're having trouble finding something, search for motion here 107 00:06:41.880 --> 00:06:43.620 And you'll see motion controller 108 00:06:43.620 --> 00:06:46.260 So, add a motion controller 109 00:06:46.260 --> 00:06:51.280 Let's name the first one 110 00:06:51.280 --> 00:06:54.080 LeftMotionController 111 00:06:54.080 --> 00:06:57.680 Add one more motion controller 112 00:06:57.680 --> 00:07:00.620 With a name motion 113 00:07:00.620 --> 00:07:05.520 RightMotionController 114 00:07:05.520 --> 00:07:09.555 Attach with LeftMotionController 115 00:07:09.555 --> 00:07:12.515 And the Right will also be set to default and attached 116 00:07:12.515 --> 00:07:16.165 So that the camera, left motion, and right motion controllers are 117 00:07:16.165 --> 00:07:19.760 All independent 118 00:07:19.760 --> 00:07:23.310 So that it is not someone else's child relationship but the same relationship 119 00:07:23.310 --> 00:07:26.210 I will attach them separately 120 00:07:26.210 --> 00:07:29.820 As children of the default root and direct children like this 121 00:07:29.820 --> 00:07:32.420 The right motion controller 122 00:07:32.420 --> 00:07:34.270 And left motion controller is 123 00:07:34.270 --> 00:07:37.000 Now in the center 124 00:07:37.000 --> 00:07:39.650 There is no one playing a role right now 125 00:07:39.650 --> 00:07:43.180 So now, I will attach mesh data to 126 00:07:43.180 --> 00:07:46.940 All three so that 127 00:07:46.940 --> 00:07:51.080 The headset mark can be displayed at the hand 128 00:07:51.080 --> 00:07:53.930 And camera positions 129 00:07:53.930 --> 00:07:58.000 So, for the first camera, select the Add button 130 00:07:58.000 --> 00:08:00.650 Static Mesh 131 00:08:00.650 --> 00:08:03.900 And attach a static mesh to it 132 00:08:03.900 --> 00:08:08.000 With the name HMD Mesh 133 00:08:08.000 --> 00:08:11.700 Head Mount Display, it is a device worn on the head 134 00:08:11.700 --> 00:08:14.450 We will attach the mesh for the head equipment 135 00:08:14.450 --> 00:08:18.100 As a child component of the camera like this 136 00:08:18.100 --> 00:08:22.000 Next, at the bottom of the details panel 137 00:08:22.000 --> 00:08:25.850 In the static mesh section 138 00:08:25.850 --> 00:08:28.640 If you search for HMD 139 00:08:28.640 --> 00:08:30.690 You will find something called Generic HMD 140 00:08:30.690 --> 00:08:34.580 So, if you assign a Generic HMD here 141 00:08:34.587 --> 00:08:37.307 Like this 142 00:08:44.041 --> 00:08:46.451 Like this 143 00:08:46.451 --> 00:08:48.701 The headset-shaped mesh 144 00:08:48.701 --> 00:08:52.340 will be created 145 00:08:52.340 --> 00:08:56.470 Next, on the LeftMotionController side 146 00:08:57.910 --> 00:09:01.840 Add - Skeletal Mesh 147 00:09:01.840 --> 00:09:04.390 We will attach a Skeletal Mesh 148 00:09:04.390 --> 00:09:10.140 I'll give it the name LeftHand here 149 00:09:10.140 --> 00:09:15.340 We will do the same Add Skeletal Mesh on the right side 150 00:09:15.340 --> 00:09:18.190 With the name Right Hand 151 00:09:18.190 --> 00:09:20.920 I will add child components 152 00:09:20.920 --> 00:09:23.570 Now, we're going to attach a hand-shaped mesh to it 153 00:09:23.570 --> 00:09:26.420 First, select the LeftHand 154 00:09:26.420 --> 00:09:28.620 In the DTS panel on the right 155 00:09:28.620 --> 00:09:33.610 If you look at the Skeletal Mesh Asset 156 00:09:33.610 --> 00:09:38.960 There will be SKM_MannyXR_Left 157 00:09:38.960 --> 00:09:42.400 And SKM_MannyXR_Right at the bottom 158 00:09:42.400 --> 00:09:48.000 Since it is left hand, select left 159 00:09:49.240 --> 00:09:52.710 For the right hand 160 00:09:53.330 --> 00:09:59.880 Select SKM_MannyXR_Right 161 00:09:59.880 --> 00:10:03.000 And attach the right hand like this 162 00:10:05.900 --> 00:10:10.600 If you look now, the Right Motion Controller 163 00:10:10.600 --> 00:10:13.100 If you move the parent's Right Motion Controller 164 00:10:13.100 --> 00:10:15.960 The child, Right Hand will also move 165 00:10:15.960 --> 00:10:19.860 If you move the Right Hand Motion Controller to the right 166 00:10:19.860 --> 00:10:22.240 This is the right hand 167 00:10:22.240 --> 00:10:23.840 If you move the Left Motion Controller 168 00:10:23.840 --> 00:10:26.040 Like this to the left 169 00:10:26.040 --> 00:10:29.720 This is the Right Hand Controller 170 00:10:29.720 --> 00:10:33.020 The location isn't that important right now 171 00:10:33.020 --> 00:10:35.420 As for the current position, I arbitrarily placed it 172 00:10:35.420 --> 00:10:38.880 At +50 and -50 173 00:10:38.880 --> 00:10:41.730 But it doesn't matter if it's at 0 or 0 anyway 174 00:10:41.730 --> 00:10:43.890 When we use the headset 175 00:10:43.890 --> 00:10:46.390 These motion controllers are 176 00:10:46.390 --> 00:10:49.000 Automatically adjusted to the position of the equipment 177 00:10:49.000 --> 00:10:50.650 We are using 178 00:10:50.650 --> 00:10:54.150 Position and rotation are automatically adjusted 179 00:10:54.150 --> 00:10:57.280 So you don't have to worry too much about that 180 00:10:57.280 --> 00:11:00.380 For now, I just put it aside for a moment 181 00:11:00.380 --> 00:11:04.840 To distinguish between the right hand and the left hand 182 00:11:06.000 --> 00:11:08.650 Next, for tracking 183 00:11:08.650 --> 00:11:11.000 Which part do you want to track now 184 00:11:11.000 --> 00:11:18.000 With the Left Hand Motion Controller selected 185 00:11:18.000 --> 00:11:20.980 If you look at the bottom 186 00:11:23.000 --> 00:11:26.430 you will see a tab called Motion Controller 187 00:11:26.430 --> 00:11:29.330 If the motion source is set to the left 188 00:11:29.330 --> 00:11:32.560 It follows the left arm 189 00:11:32.560 --> 00:11:36.160 It is correct that the Left Motion Controller follows the left hand 190 00:11:36.160 --> 00:11:38.760 However, in the case of a Right Motion Controller 191 00:11:38.760 --> 00:11:40.740 You have to follow your right hand 192 00:11:40.740 --> 00:11:44.820 I'll change the motion source of the Motion Controller 193 00:11:44.820 --> 00:11:47.840 From left to right 194 00:11:47.840 --> 00:11:51.740 If you look at the motion source here, there are various things like 195 00:11:51.740 --> 00:11:54.820 Left grip, aim, and metal capel 196 00:11:54.820 --> 00:11:58.220 VR equipment has 197 00:11:58.220 --> 00:12:01.420 Not only hand-controlled controllers 198 00:12:01.420 --> 00:12:05.120 But also, elbow trackers that track the elbows 199 00:12:05.120 --> 00:12:07.570 Knee trackers mounted on the knees 200 00:12:07.570 --> 00:12:10.120 Waist trackers mounted on the waist, etc. 201 00:12:10.580 --> 00:12:14.660 There are all kinds of devices for tracking various parts of the joint 202 00:12:14.660 --> 00:12:16.910 There are even gloves 203 00:12:16.910 --> 00:12:18.960 Track the thumb, index finger, middle finger, ring finger 204 00:12:18.960 --> 00:12:23.040 And even little finger 205 00:12:23.060 --> 00:12:25.910 But basically, all we need to do is 206 00:12:25.910 --> 00:12:30.000 Track the light and motion source 207 00:12:30.000 --> 00:12:33.250 Just specify Left for the left hand and Light for the right 208 00:12:33.250 --> 00:12:37.000 as the motion source 209 00:12:39.200 --> 00:12:40.700 In the case of cameras 210 00:12:40.700 --> 00:12:43.310 The motion source will not be specified separately 211 00:12:43.310 --> 00:12:46.110 And the head will be selected later 212 00:12:46.110 --> 00:12:49.000 From the event graph 213 00:12:50.260 --> 00:12:54.000 First, let’s go into the event Graph tab 214 00:12:54.000 --> 00:12:57.000 Right-click 215 00:13:04.261 --> 00:13:07.000 On the Event Graph tab 216 00:13:08.940 --> 00:13:12.840 And select Is HMD Head 217 00:13:12.840 --> 00:13:16.440 First, check whether the mounted display is 218 00:13:16.440 --> 00:13:19.870 enabled and whether head-mounted equipment 219 00:13:19.870 --> 00:13:23.300 can be used 220 00:13:25.920 --> 00:13:29.920 First, check whether the head mount device is 221 00:13:29.920 --> 00:13:32.640 Connected to the PC 222 00:13:32.640 --> 00:13:35.290 So, if 223 00:13:35.290 --> 00:13:39.000 The Head Mount Display Enabled is True 224 00:13:39.000 --> 00:13:42.500 Search for Set Tracking Origin 225 00:13:42.500 --> 00:13:45.590 And add 226 00:13:45.590 --> 00:13:49.060 The Set Tracking Origin node 227 00:13:49.060 --> 00:13:53.410 This is based on which side 228 00:13:53.410 --> 00:13:56.000 The headset equipment will be positioned 229 00:13:56.000 --> 00:13:58.550 If you have a pawn, there are things like whether you want to do it 230 00:13:58.550 --> 00:14:01.480 From the center of the pawn or the bottom 231 00:14:01.480 --> 00:14:06.460 But these standards vary depending on the head mount equipment 232 00:14:06.460 --> 00:14:09.910 Among the head mount devices is 233 00:14:09.910 --> 00:14:12.740 The Oculus Quest type that we are currently using 234 00:14:12.760 --> 00:14:18.000 And then there is also the Vive made by HTC 235 00:14:18.000 --> 00:14:21.600 There are things like Cardboard made by Google 236 00:14:21.600 --> 00:14:23.000 and other things 237 00:14:23.000 --> 00:14:26.950 For various devices, such as Samsung's Gear VR 238 00:14:26.950 --> 00:14:30.980 The height reference point differs for each skin point 239 00:14:30.980 --> 00:14:32.830 So you need to match it to the device 240 00:14:32.830 --> 00:14:35.230 As standard 241 00:14:35.230 --> 00:14:37.930 Oculus Quest and HTC Vive 242 00:14:37.930 --> 00:14:40.000 Probably come with stages 243 00:14:40.000 --> 00:14:42.950 So, I will change it to a stage 244 00:14:42.950 --> 00:14:46.760 And put it in stage form 245 00:14:53.701 --> 00:14:58.500 Next, do compile, and save 246 00:14:59.420 --> 00:15:01.570 Then, let's return to the map 247 00:15:01.570 --> 00:15:07.180 And check if the tracking works properly 248 00:15:09.480 --> 00:15:14.540 Please turn on VR and let us raise our hands one at a time 249 00:15:14.540 --> 00:15:19.090 Now, the camera seems to move well if I move my head 250 00:15:19.090 --> 00:15:22.480 My hands move well, but there is one strange thing 251 00:15:22.480 --> 00:15:26.030 Now, the right and left hands are aligned 252 00:15:26.030 --> 00:15:31.260 But the direction of the hand does not match the direction of the actual controller 253 00:15:31.260 --> 00:15:34.710 So, let's rotate this shape a bit to fit 254 00:15:34.710 --> 00:15:38.020 The position of the controller 255 00:15:40.620 --> 00:15:45.170 Go back to the Hunet VR Player Pawn 256 00:15:45.170 --> 00:15:50.941 On the left handle in the viewport 257 00:15:52.741 --> 00:15:55.400 Click the rotation tool 258 00:15:55.400 --> 00:15:58.650 And then rotate it 90 degrees to the right side 259 00:15:58.650 --> 00:16:03.350 And then 90 degrees 260 00:16:03.350 --> 00:16:05.200 To this side 261 00:16:05.200 --> 00:16:08.800 Then, my right hand 262 00:16:08.800 --> 00:16:12.050 Left to 90 degrees 263 00:16:12.050 --> 00:16:15.630 And 90 degrees in this direction 264 00:16:15.630 --> 00:16:17.820 So that my hand is standing like this 265 00:16:17.820 --> 00:16:20.370 Usually, when we take control, the standard is 266 00:16:20.370 --> 00:16:23.000 Set like this 267 00:16:23.000 --> 00:16:25.200 First, compile and save 268 00:16:25.200 --> 00:16:28.220 Then see if the hand appears at this angle 269 00:16:28.220 --> 00:16:30.170 Do not rotate the motion controller 270 00:16:30.170 --> 00:16:33.500 All you have to do is set the rotation of the motion controller to 0, 0, 0, 0 271 00:16:33.500 --> 00:16:36.050 And rotate the hand skeletal mesh 272 00:16:36.050 --> 00:16:40.360 Underneath it like this 273 00:16:40.360 --> 00:16:43.340 Let’s press play to confirm 274 00:16:43.340 --> 00:16:46.840 I raised my hand this time 275 00:16:46.840 --> 00:16:48.540 But I think I raised it too much 276 00:16:48.540 --> 00:16:51.040 At this point, my hand is 277 00:16:51.040 --> 00:16:53.640 A little higher than my hand right now 278 00:16:53.640 --> 00:16:56.720 Let me lower it a little bit 279 00:16:59.480 --> 00:17:02.030 Since my hand was too high 280 00:17:02.030 --> 00:17:03.600 I will lower it slightly now 281 00:17:03.600 --> 00:17:08.000 Should we just try lowering it by about 40 degrees? 282 00:17:17.000 --> 00:17:21.200 Now that we raise our hands, it seems to be somewhat similar 283 00:17:21.200 --> 00:17:24.960 To the direction in which we actually point our hands 284 00:17:24.960 --> 00:17:28.660 So, place the hand at an angle like this 285 00:17:28.660 --> 00:17:31.000 Now we're going to press the button 286 00:17:31.000 --> 00:17:34.200 The fingers still don't move like 287 00:17:34.200 --> 00:17:37.860 The VR templates we tested before 288 00:17:37.860 --> 00:17:40.780 We'll have to process animations for that later 289 00:17:40.780 --> 00:17:43.080 But for now, we'll try to get some input 290 00:17:43.080 --> 00:17:46.460 As to whether a key was pressed and display it as a log 291 00:17:46.460 --> 00:17:49.750 If we wear a headset like we are now 292 00:17:49.750 --> 00:17:52.540 When leaving a log with a print string 293 00:17:52.540 --> 00:17:55.580 It is not easy to check it 294 00:17:55.580 --> 00:17:59.000 I can't keep putting the headset on and taking it off 295 00:17:59.000 --> 00:18:03.300 So what we're going to do is 296 00:18:03.300 --> 00:18:07.000 We're going to put some 3D text up here that can display something 297 00:18:07.000 --> 00:18:10.900 On the top of the hand like this, on the top of the wrist on both sides 298 00:18:12.840 --> 00:18:17.240 Now, go back to the BP Hunet VR Player Pawn 299 00:18:17.240 --> 00:18:19.820 And this time 300 00:18:21.520 --> 00:18:28.000 Add it as a child component of the Left Motion Controller 301 00:18:30.660 --> 00:18:38.000 If you look down, you will find something called a Text Render 302 00:18:40.160 --> 00:18:43.310 Text Render 303 00:18:43.310 --> 00:18:48.140 Make the Text Render component a child of Left Motion 304 00:18:48.140 --> 00:18:51.910 With the name Left Log 305 00:18:51.910 --> 00:18:54.300 We will give it a text component 306 00:18:54.300 --> 00:18:57.700 Add to the right hand 307 00:18:57.700 --> 00:19:02.720 And attach a component called Text Render 308 00:19:02.720 --> 00:19:07.240 I'll name it Right Log 309 00:19:09.540 --> 00:19:14.140 Now, you will see text written at the positions 310 00:19:14.140 --> 00:19:18.060 of your right and left hands, respectively 311 00:19:18.060 --> 00:19:22.590 I'll just label it as the child of left hand and right hand 312 00:19:22.590 --> 00:19:26.000 Because the hands are going together anyway 313 00:19:28.900 --> 00:19:35.300 In the first Left Log, I will set it to 0, 0, 0 314 00:19:39.000 --> 00:19:42.100 And then rotate it 315 00:19:42.100 --> 00:19:46.000 So it is in the same direction as the hand 316 00:19:47.120 --> 00:19:52.000 I think it should be around -90, -90 317 00:19:53.160 --> 00:20:00.000 After initializing the Right Log on the right hand 318 00:20:00.940 --> 00:20:04.690 It should be -90, -90 319 00:20:04.690 --> 00:20:08.840 So this should be +90, not -90 320 00:20:08.840 --> 00:20:11.000 This side should also be +90 321 00:20:15.000 --> 00:20:19.100 90, 0, and -90 322 00:20:19.100 --> 00:20:21.100 Because the direction on the right is different 323 00:20:23.160 --> 00:20:27.710 The letters and text appear backward at the back 324 00:20:27.710 --> 00:20:30.800 So, I think we need to set it like this 325 00:20:30.800 --> 00:20:34.460 So that our gaze is in the right direction 326 00:20:34.460 --> 00:20:38.000 Next, I will raise 327 00:20:39.160 --> 00:20:46.000 The position of the Left Log a little bit 328 00:20:47.720 --> 00:20:53.540 By about -20 329 00:20:56.000 --> 00:20:59.000 Set it to 0, 0, 0 330 00:21:00.580 --> 00:21:04.680 I'll do the same with the Right Log 331 00:21:04.680 --> 00:21:10.000 Raising it about 20 degrees upwards 332 00:21:13.200 --> 00:21:16.150 Also, the text in the Left Log is 333 00:21:16.150 --> 00:21:18.550 Currently written to 334 00:21:18.550 --> 00:21:20.650 The right based on this pivot 335 00:21:20.650 --> 00:21:23.480 So it is aligned to the left 336 00:21:23.480 --> 00:21:25.580 But now, to align the font 337 00:21:25.580 --> 00:21:28.280 In the center around the hand 338 00:21:28.280 --> 00:21:31.980 If you look at the bottom here 339 00:21:31.980 --> 00:21:34.800 The horizontal alignment of the font is currently set to the left 340 00:21:34.800 --> 00:21:37.580 So you can set it to the center 341 00:21:37.580 --> 00:21:42.480 If you set the vertical alignment to the text center like this 342 00:21:42.480 --> 00:21:47.930 The sentence will pivot, and the letters will be input 343 00:21:47.930 --> 00:21:50.440 To align with the exact center of the text 344 00:21:51.600 --> 00:21:55.450 Even in the case of the text color 345 00:21:55.450 --> 00:21:58.700 I will try to use a slightly yellow color 346 00:21:58.700 --> 00:22:03.000 That is more noticeable than white 347 00:22:04.680 --> 00:22:09.000 Should I go with a slightly brighter color? 348 00:22:11.260 --> 00:22:14.480 I'll mark it with a bright yellow color so it stands out 349 00:22:14.480 --> 00:22:17.870 I'm going to set the right hand the same way 350 00:22:17.870 --> 00:22:24.720 I'll mark horizontal as the center and vertical as the text center 351 00:22:24.720 --> 00:22:28.970 And then the render color will be yellow 352 00:22:30.530 --> 00:22:34.580 Which is completely bright yellow 353 00:22:34.580 --> 00:22:38.850 So that both are displayed like this 354 00:22:38.850 --> 00:22:43.380 Once you compile and save 355 00:22:46.000 --> 00:22:47.800 The text above your hand will 356 00:22:47.800 --> 00:22:50.540 Look like this in the playlist 357 00:22:50.540 --> 00:22:53.090 The text seems a bit large right now 358 00:22:53.090 --> 00:22:57.520 So I'll try reducing the font a little 359 00:22:57.520 --> 00:23:00.720 First, starting from the left log 360 00:23:00.720 --> 00:23:02.620 Here is the font size 361 00:23:02.620 --> 00:23:04.000 It's called world size 362 00:23:04.000 --> 00:23:07.850 It's currently set to 26, but I think 26 is a little too big 363 00:23:07.850 --> 00:23:10.440 So I'll reduce it to about 15 364 00:23:10.440 --> 00:23:18.340 I'll also try reducing the font for the Right Log to around 15 365 00:23:20.780 --> 00:23:22.660 Compile, save 366 00:23:23.115 --> 00:23:26.135 Get User Input 367 00:23:27.000 --> 00:23:32.340 Now, it's our turn to receive actual input 368 00:23:32.340 --> 00:23:36.890 When receiving input 369 00:23:36.890 --> 00:23:40.820 You first need a file related to the input in the content draw 370 00:23:40.820 --> 00:23:43.220 First, let's create a folder to create 371 00:23:43.220 --> 00:23:47.100 The input mapping context and input action files 372 00:23:47.100 --> 00:23:51.820 Click the Add button in the content folder 373 00:23:51.820 --> 00:23:54.000 And select New Folder 374 00:23:54.000 --> 00:24:01.000 Let me create a folder with the name Inputs 375 00:24:01.000 --> 00:24:04.750 Then, go into this Inputs folder 376 00:24:04.750 --> 00:24:07.420 Right-click 377 00:24:07.420 --> 00:24:14.000 And create an Input Mapping Context in the input 378 00:24:14.000 --> 00:24:24.000 We'll call this IMC_HunetInputMappings 379 00:24:24.000 --> 00:24:26.650 With the name Hunet Input Mappings 380 00:24:26.650 --> 00:24:30.300 I will create an input mapping context 381 00:24:30.300 --> 00:24:32.950 Next, I'll right-click the mouse 382 00:24:32.950 --> 00:24:37.000 And add an input action to the input 383 00:24:37.000 --> 00:24:48.000 We will create one with the name IA_Index Trigger_Left 384 00:24:48.000 --> 00:24:51.900 This happens when you press a button on your left hand 385 00:24:51.900 --> 00:24:54.580 called an index trigger 386 00:24:54.580 --> 00:24:57.890 Then, right-click the mouse 387 00:24:57.890 --> 00:25:01.180 and select Input Action 388 00:25:01.180 --> 00:25:11.140 This time, we will call it IA_ThumbstickAxis_Left 389 00:25:11.140 --> 00:25:17.190 Thumbstick axis left, index trigger left 390 00:25:17.190 --> 00:25:22.000 On one more input 391 00:25:22.000 --> 00:25:28.400 Including IA_Hand Trigger_Left 392 00:25:28.400 --> 00:25:33.000 We will test 3 input actions 393 00:25:33.000 --> 00:25:38.000 If you look at the thumbstick on the controller 394 00:25:53.820 --> 00:25:57.960 The text here is a little blurry 395 00:25:57.960 --> 00:26:00.960 But this is what we call 396 00:26:00.960 --> 00:26:02.860 The thumbstick now 397 00:26:02.860 --> 00:26:05.600 I have this thumbstick as a 2D marker 398 00:26:05.600 --> 00:26:10.240 So you can move the pad up, down, left, and right 399 00:26:10.240 --> 00:26:14.680 The index trigger is this button where your index finger touches 400 00:26:14.680 --> 00:26:16.380 When you click this button 401 00:26:16.380 --> 00:26:18.620 Index Trigger Button is clicked 402 00:26:18.620 --> 00:26:20.770 When you press this button 403 00:26:20.770 --> 00:26:23.880 The index trigger button is pressed 404 00:26:23.880 --> 00:26:27.900 So what I wanted to create as an input action now was 405 00:26:27.900 --> 00:26:31.310 To create a thumbstick button, an index trigger 406 00:26:31.310 --> 00:26:34.400 And a hand trigger 407 00:26:34.400 --> 00:26:38.380 Please remember that there is also 408 00:26:39.720 --> 00:26:41.420 A separate button called XY 409 00:26:41.440 --> 00:26:45.000 Now, in the case of hand triggers 410 00:26:45.000 --> 00:26:49.060 it would be digital 411 00:26:49.060 --> 00:26:51.680 Because you just press it and release it 412 00:26:51.680 --> 00:26:55.000 Now, in the case of index triggers 413 00:26:55.000 --> 00:26:59.000 we will also check with a digital bool 414 00:27:00.824 --> 00:27:02.324 Save 415 00:27:03.760 --> 00:27:07.560 In the case of the thumbstick axis 416 00:27:07.560 --> 00:27:09.680 instead of the digital bool 417 00:27:09.680 --> 00:27:14.000 the thumbstick could be moved up, down, left, and right 418 00:27:14.000 --> 00:27:19.000 So, we will change it to vector 2D form like this 419 00:27:19.000 --> 00:27:21.360 Axis 2D 420 00:27:21.360 --> 00:27:24.000 then save 421 00:27:28.800 --> 00:27:31.000 and assign this 422 00:27:31.000 --> 00:27:35.000 to the input mapping context 423 00:27:35.000 --> 00:27:39.680 Double-click the input mapping context file to open it 424 00:27:39.680 --> 00:27:43.920 In the mappings, click the plus button to add one 425 00:27:43.920 --> 00:27:48.920 First, add an IA_index trigger 426 00:27:48.920 --> 00:27:51.920 left button 427 00:27:51.920 --> 00:27:54.000 Another addition is 428 00:27:54.000 --> 00:27:58.640 the IA_hand trigger 429 00:27:58.640 --> 00:28:02.000 We will allocate a left file 430 00:28:02.000 --> 00:28:04.660 I'll add another 431 00:28:04.660 --> 00:28:12.600 IA_thumbstick axis 432 00:28:12.600 --> 00:28:16.640 In the case of the first index trigger 433 00:28:16.640 --> 00:28:20.000 if you look here, it says Oculus Touch 434 00:28:20.000 --> 00:28:24.000 Oculus Touch The Quest controller provided by Oculus is 435 00:28:24.000 --> 00:28:27.000 named Oculus Touch 436 00:28:27.000 --> 00:28:31.680 Among Oculus Touch, there are Horizontal Left 437 00:28:31.680 --> 00:28:33.000 Left, and Right 438 00:28:33.000 --> 00:28:37.000 Among these, there will be a trigger on the left 439 00:28:37.000 --> 00:28:40.000 There is not just one trigger 440 00:28:40.000 --> 00:28:43.400 but a trigger axis and trigger touch, this is index trigger 441 00:28:43.400 --> 00:28:46.000 Among them, if we are not sure 442 00:28:46.000 --> 00:28:49.320 we will assign the trigger first 443 00:28:50.420 --> 00:28:53.000 As with the hand trigger 444 00:28:53.000 --> 00:28:56.420 a button will be assigned to the inside of the hand trigger 445 00:28:56.420 --> 00:28:59.100 but in Oculus Touch 446 00:29:00.320 --> 00:29:03.180 the hand trigger is called a grip 447 00:29:03.180 --> 00:29:06.840 So, the grip has a grip button 448 00:29:06.840 --> 00:29:09.000 and a grip axis 449 00:29:09.000 --> 00:29:12.050 So, if we're not sure 450 00:29:12.050 --> 00:29:14.740 we'll just choose a grip 451 00:29:16.000 --> 00:29:21.220 Next, IA_Thumbstick Axis Left 452 00:29:21.680 --> 00:29:24.500 on the left side of Oculus Touch 453 00:29:26.140 --> 00:29:30.000 there are various thumbstick axis 454 00:29:30.000 --> 00:29:34.000 and you can set them separately 455 00:29:34.000 --> 00:29:37.000 to receive only the X-axis value or the Y-axis value 456 00:29:37.000 --> 00:29:41.000 There is also a 2D axis that can receive 457 00:29:41.000 --> 00:29:43.840 all the 2D XY coordinates we wanted 458 00:29:43.840 --> 00:29:46.490 Also, there are buttons under it for touch, up 459 00:29:46.490 --> 00:29:48.100 down, left, and right 460 00:29:48.100 --> 00:29:49.750 If you are unsure 461 00:29:49.750 --> 00:29:53.260 we will start with the 2D axis first 462 00:29:53.940 --> 00:29:57.300 I'll save it later 463 00:29:57.300 --> 00:30:03.540 And then I'll come back to the BP Hunet VR Player Pawn 464 00:30:03.540 --> 00:30:07.000 Now, go to the Event Graph tab here 465 00:30:07.000 --> 00:30:09.340 In the event graph tab 466 00:30:10.800 --> 00:30:13.500 let’s register the input mapping context 467 00:30:13.500 --> 00:30:16.000 to the system 468 00:30:16.000 --> 00:30:20.880 Now, first, GetPlayerController 469 00:30:20.880 --> 00:30:23.650 Related to the input 470 00:30:23.650 --> 00:30:27.000 the player controller class handles everything 471 00:30:27.000 --> 00:30:30.150 Controller 0 in GetPlayerController is 472 00:30:30.150 --> 00:30:33.480 the controller we are operating 473 00:30:33.480 --> 00:30:39.360 GetLocal from controller 0 474 00:30:39.360 --> 00:30:41.520 If you search for GetLocal 475 00:30:41.520 --> 00:30:47.380 you will find a function called GetEnhancedInputLocalPlayerSubsystem 476 00:30:47.380 --> 00:30:51.560 GetEnhancedInputLocalPlayerSubsystem 477 00:30:51.560 --> 00:30:54.340 The name is a bit long so it might be difficult to remember 478 00:30:54.340 --> 00:30:59.000 Just type input local and you will be able to find it 479 00:30:59.700 --> 00:31:05.200 Now, if you search for Add Mapping Context here 480 00:31:05.200 --> 00:31:08.900 you will find a node called Add Mapping Context 481 00:31:08.900 --> 00:31:14.000 Connect the execution pin to Add Mapping Context 482 00:31:14.000 --> 00:31:19.260 Next, as the mapping context file 483 00:31:19.260 --> 00:31:25.380 we will specify the IMC Hunet Input Mappings file we created earlier 484 00:31:25.380 --> 00:31:28.420 You can set the priority to 0 485 00:31:28.420 --> 00:31:30.640 Okay, so the mapping is done 486 00:31:30.640 --> 00:31:34.240 We registered the input mapping context file we created 487 00:31:34.240 --> 00:31:38.840 as a subsystem of enhanced input 488 00:31:39.540 --> 00:31:43.440 We should log in to see if 489 00:31:43.440 --> 00:31:45.680 what we entered is correct 490 00:31:45.680 --> 00:31:48.500 Now, the first thing we did was 491 00:31:48.500 --> 00:31:53.360 IA_Index Trigger_Left 492 00:31:53.360 --> 00:31:56.140 So, with the event 493 00:31:57.000 --> 00:32:00.460 we will run the IA_Index Trigger_Left node 494 00:32:00.460 --> 00:32:02.000 It is initially folded 495 00:32:02.000 --> 00:32:03.740 but this will unfold all the actions 496 00:32:03.740 --> 00:32:06.280 By pressing the button 497 00:32:06.280 --> 00:32:08.360 when we press it 498 00:32:08.360 --> 00:32:11.280 when it is started 499 00:32:12.000 --> 00:32:16.160 add the set text node 500 00:32:16.160 --> 00:32:22.360 of this left log 501 00:32:22.360 --> 00:32:27.540 and connect the execution pin to the start like this 502 00:32:27.540 --> 00:32:31.380 To connect the text here 503 00:32:31.380 --> 00:32:38.620 let's run the Make Literal Text node 504 00:32:38.620 --> 00:32:40.600 And here 505 00:32:40.600 --> 00:32:53.000 output the Index Trigger Pressed 506 00:32:55.880 --> 00:32:58.440 Let’s try output it like this 507 00:32:58.440 --> 00:33:00.000 Then, when it is released 508 00:33:00.000 --> 00:33:03.960 and completed 509 00:33:03.960 --> 00:33:08.100 it will do a set text 510 00:33:10.400 --> 00:33:12.580 Then 511 00:33:12.580 --> 00:33:16.000 I'll duplicate this using Ctrl D 512 00:33:16.000 --> 00:33:23.000 In addition, it is inputted 513 00:33:23.000 --> 00:33:25.699 when completed 514 00:33:32.400 --> 00:33:35.000 Here 515 00:33:35.000 --> 00:33:39.180 we will compile and save 516 00:33:41.620 --> 00:33:45.160 the Index Trigger released 517 00:33:45.160 --> 00:33:47.560 Similarly 518 00:33:49.580 --> 00:33:54.000 add an event node 519 00:33:54.000 --> 00:33:57.240 to the left 520 00:33:57.240 --> 00:34:00.260 IA_Hand Trigger event file 521 00:34:02.620 --> 00:34:07.340 Likewise, this time set text 522 00:34:10.540 --> 00:34:12.640 in the left log 523 00:34:13.600 --> 00:34:16.180 Let me add a set text 524 00:34:16.180 --> 00:34:20.380 and connect it to Started 525 00:34:21.740 --> 00:34:23.000 Next 526 00:34:23.000 --> 00:34:27.400 After Make Text 527 00:34:27.400 --> 00:34:30.000 Add Make Literal Text 528 00:34:30.000 --> 00:34:37.751 And here, enter the word 529 00:34:37.751 --> 00:34:40.160 Hand Trigger Pressed 530 00:34:40.160 --> 00:34:45.419 and connect it like this so that it is output to the log 531 00:34:51.000 --> 00:34:55.800 Also, duplicate set text by pressing Ctrl D 532 00:34:57.340 --> 00:35:01.660 When you release the Complete button 533 00:35:03.320 --> 00:35:06.520 when you release button 534 00:35:10.660 --> 00:35:14.580 duplicate the Make Literal text again 535 00:35:16.620 --> 00:35:20.500 and instead of Pressed 536 00:35:20.500 --> 00:35:22.780 connect 537 00:35:25.940 --> 00:35:28.800 the Released value 538 00:35:29.800 --> 00:35:32.000 Lastly 539 00:35:32.000 --> 00:35:37.220 add IA_ThumbstickAxis_Left 540 00:35:37.220 --> 00:35:40.300 as an event 541 00:35:41.600 --> 00:35:46.160 Likewise, in the left log 542 00:35:46.820 --> 00:35:49.780 do set text 543 00:35:53.000 --> 00:35:55.000 In the case of the thumbstick 544 00:35:55.000 --> 00:35:59.140 it will be receiving in the form of an Axis or 2D Axis vector 545 00:35:59.140 --> 00:36:03.000 so each time you press the trigger 546 00:36:03.000 --> 00:36:05.580 you will receive that value for the entire time you press it 547 00:36:05.580 --> 00:36:07.760 So, the actual value will be 548 00:36:07.760 --> 00:36:11.700 the value of this action 549 00:36:11.700 --> 00:36:15.660 We will directly connect this value to the value 550 00:36:15.660 --> 00:36:19.560 and output 551 00:36:19.560 --> 00:36:22.380 the vector 2D value 552 00:36:22.380 --> 00:36:25.680 Also, I duplicated the set texts once more 553 00:36:27.340 --> 00:36:30.000 I did not connect them here either 554 00:36:30.000 --> 00:36:32.620 Target here 555 00:36:32.620 --> 00:36:35.560 Didn't I do it above? I did 556 00:36:35.560 --> 00:36:37.540 Connect the target 557 00:36:37.540 --> 00:36:40.140 and when you finally release your hand 558 00:36:40.140 --> 00:36:42.340 When you release your hand 559 00:36:44.680 --> 00:36:45.980 When you release your hand 560 00:36:45.980 --> 00:36:48.440 so that this value is output like this 561 00:36:48.440 --> 00:36:51.640 we will input it once 562 00:36:54.260 --> 00:36:58.180 The rest was entered like this 563 00:36:58.180 --> 00:37:00.040 Then actually 564 00:37:00.040 --> 00:37:03.840 press the compile and save buttons 565 00:37:03.840 --> 00:37:06.000 If you come to the main screen 566 00:37:06.620 --> 00:37:10.380 and look at the bottom 567 00:37:10.380 --> 00:37:13.000 you will see the VR Template 568 00:37:13.000 --> 00:37:17.760 If you look inside the VR template 569 00:37:17.760 --> 00:37:21.220 you will see a folder called Input if you look here 570 00:37:21.220 --> 00:37:25.000 There is something called PMI_VR Template 571 00:37:25.000 --> 00:37:29.580 Double-click this file to open the settings window 572 00:37:29.580 --> 00:37:34.000 Here is Player Mappable 573 00:37:34.000 --> 00:37:38.000 Speaking of context 574 00:37:38.000 --> 00:37:40.950 there are arrays of input mapping context files 575 00:37:40.950 --> 00:37:42.580 to be registered in VR 576 00:37:42.580 --> 00:37:45.000 What we created is not here now 577 00:37:45.000 --> 00:37:47.500 So, click the plus button here 578 00:37:47.500 --> 00:37:49.280 to add one more 579 00:37:49.280 --> 00:37:51.480 In addition 580 00:37:53.180 --> 00:37:58.380 we will assign the IMC_Hunet 581 00:37:58.380 --> 00:38:00.330 and input mapping files 582 00:38:00.330 --> 00:38:02.860 we created here like this 583 00:38:04.220 --> 00:38:07.240 First, save it 584 00:38:10.420 --> 00:38:12.600 and then press play 585 00:38:12.600 --> 00:38:15.860 to test it in real life 586 00:38:18.200 --> 00:38:21.000 Next, look at your left hand 587 00:38:21.000 --> 00:38:23.000 with your left index finger 588 00:38:23.000 --> 00:38:25.000 when you press the index trigger button 589 00:38:25.000 --> 00:38:27.830 A button called Index Trigger Pressed 590 00:38:27.830 --> 00:38:29.660 will appear like this 591 00:38:29.660 --> 00:38:33.660 When you release your hand, the message “Index Trigger Released” 592 00:38:33.660 --> 00:38:35.100 will be displayed 593 00:38:35.100 --> 00:38:38.000 Shall we try a hand trigger? 594 00:38:38.000 --> 00:38:42.540 If you press the button with your middle finger 595 00:38:42.540 --> 00:38:44.400 the hand trigger is pressed 596 00:38:44.400 --> 00:38:49.160 When you release it, it will say hand trigger released 597 00:38:49.160 --> 00:38:52.000 Then, if you move the thumbstick 598 00:38:52.000 --> 00:38:55.700 up or down and left or right with your thumb 599 00:38:55.700 --> 00:38:58.340 if you move it up correctly 600 00:38:58.340 --> 00:39:01.000 Y will almost always point to a value of 1 601 00:39:01.000 --> 00:39:04.000 X will point to a value of 0, close to 0 602 00:39:04.000 --> 00:39:08.600 If you move it down, X will be close to 0 603 00:39:08.600 --> 00:39:12.000 and Y will be close to -1 604 00:39:12.000 --> 00:39:17.000 X is a value close to -1 when turned to the left 605 00:39:17.000 --> 00:39:21.820 If you move X to the right, X will be close to +1 606 00:39:23.560 --> 00:39:28.520 In this way, we can mark our hands 607 00:39:28.520 --> 00:39:30.000 Now, if you just set this up 608 00:39:30.000 --> 00:39:33.000 and create only IA files and input action files 609 00:39:33.000 --> 00:39:36.120 you can output the same thing with your right hand 610 00:39:38.000 --> 00:39:41.000 Now, if you look at the input 611 00:39:41.000 --> 00:39:44.880 and the input mapping context earlier 612 00:39:45.740 --> 00:39:49.980 in the case of the index trigger 613 00:39:50.000 --> 00:39:53.000 there are three types of left index triggers in Oculus Touch 614 00:39:53.000 --> 00:39:56.000 axis, touch, and trigger 615 00:39:56.000 --> 00:39:58.000 There are three kinds 616 00:39:58.000 --> 00:40:02.000 So, in the case of the index trigger button 617 00:40:02.000 --> 00:40:05.300 if you just select the index trigger 618 00:40:05.300 --> 00:40:08.820 the value will come out as a true false 619 00:40:08.820 --> 00:40:11.480 If you use the index trigger axis 620 00:40:11.480 --> 00:40:15.620 the input level of the button is 0 621 00:40:15.620 --> 00:40:18.380 when it is not pressed, and 1 is when it is pressed all the way 622 00:40:18.380 --> 00:40:21.380 and the value will be between 0 and 1 623 00:40:21.380 --> 00:40:24.820 Now, when it comes to touch 624 00:40:24.820 --> 00:40:27.860 when your finger touches the button before pressing the button 625 00:40:27.860 --> 00:40:31.520 input can be received through True False 626 00:40:31.520 --> 00:40:34.000 So, let's change it one by one 627 00:40:34.000 --> 00:40:37.540 and print the value 628 00:40:37.540 --> 00:40:40.000 First, let's change it to Axis 629 00:40:40.000 --> 00:40:43.940 Try changing the left trigger to the axis 630 00:40:43.940 --> 00:40:46.000 and then save 631 00:40:49.240 --> 00:40:52.540 On the index trigger left side 632 00:40:52.540 --> 00:40:57.880 this time, instead of printing the text directly 633 00:40:59.780 --> 00:41:01.820 change it to the trigger axis 634 00:41:01.820 --> 00:41:03.500 Save it 635 00:41:03.500 --> 00:41:06.000 Next, we will change the value 636 00:41:06.000 --> 00:41:09.880 of the index trigger left 637 00:41:09.880 --> 00:41:12.420 to Floats instead of Bool 638 00:41:12.420 --> 00:41:17.072 so that this key can actually enter the axis value 639 00:41:17.072 --> 00:41:19.792 Save 640 00:41:24.720 --> 00:41:29.440 Next, the action value of the index trigger was changed to true 641 00:41:29.440 --> 00:41:33.240 Let's take this value and print it out 642 00:41:33.240 --> 00:41:35.720 each time 643 00:41:35.720 --> 00:41:39.320 it is pressed and released 644 00:41:39.320 --> 00:41:42.000 Then, this axis is 645 00:41:42.000 --> 00:41:43.920 the value of pressing the button 646 00:41:43.920 --> 00:41:47.340 pressing the button halfway, pressing it about a third of the way 647 00:41:47.340 --> 00:41:51.180 pressing it all the way, and so on to continuously check the situation 648 00:41:51.180 --> 00:41:53.600 I'll take off the started 649 00:41:53.600 --> 00:41:58.020 and connect the trigger 650 00:41:58.020 --> 00:42:02.400 The converted value will continue to be output 651 00:42:02.400 --> 00:42:04.920 as long as the button is pressed 652 00:42:04.920 --> 00:42:07.240 After compiling and saving it 653 00:42:07.240 --> 00:42:09.480 I will output it 654 00:42:09.480 --> 00:42:13.000 Let's just look at the left hand first 655 00:42:13.000 --> 00:42:16.460 When you press the index trigger with index finger 656 00:42:16.460 --> 00:42:19.000 the number will go up 657 00:42:19.000 --> 00:42:22.520 If you press it up, it becomes 1 658 00:42:22.520 --> 00:42:25.360 and when you start rereleasing it, the number decreases 659 00:42:25.360 --> 00:42:28.120 and you can see that it becomes 0 when you release it completely 660 00:42:28.120 --> 00:42:32.320 This means you can directly get the value between 0 and 1 661 00:42:32.320 --> 00:42:37.280 such as how much the button was pressed 662 00:42:38.480 --> 00:42:41.660 This time, the index trigger will be changed 663 00:42:41.660 --> 00:42:44.420 from Axis 1 to digital again 664 00:42:44.420 --> 00:42:46.580 Change it back to Bool type 665 00:42:46.580 --> 00:42:48.020 After saving 666 00:42:48.020 --> 00:42:51.860 in the input mapping context 667 00:42:53.020 --> 00:42:56.060 I used the Oculus Touch 668 00:42:57.228 --> 00:43:01.240 and tried the trigger and trigger axis this time 669 00:43:01.240 --> 00:43:03.380 It is said that true false is displayed whether the button is pressed or not pressed 670 00:43:03.380 --> 00:43:06.580 the value of the degree of pressing is displayed as a value from 0 to 142 671 00:43:06.580 --> 00:43:10.000 and the trigger touch is not a button pressed 672 00:43:10.000 --> 00:43:13.960 but a true false is displayed when the button is touched 673 00:43:13.960 --> 00:43:16.000 I'll change it to this 674 00:43:16.000 --> 00:43:19.840 change it to touch, save it 675 00:43:19.840 --> 00:43:22.580 and test it out 676 00:43:25.360 --> 00:43:28.440 First, I will output the value 677 00:43:32.500 --> 00:43:35.420 directly using True False here 678 00:43:35.420 --> 00:43:37.140 You can use text 679 00:43:37.140 --> 00:43:42.100 but I'll try outputting it as True False 680 00:43:44.300 --> 00:43:47.420 Since it is True False, there is no need for a trigger 681 00:43:47.420 --> 00:43:50.320 and you can reconnect to Started 682 00:43:50.320 --> 00:43:53.260 If you compile, save 683 00:43:54.520 --> 00:43:57.360 and play again 684 00:43:59.700 --> 00:44:03.680 you can now see that instead of pressing the button 685 00:44:03.680 --> 00:44:06.300 if you just lightly touch the button 686 00:44:06.300 --> 00:44:08.000 Touch, false, touch, false 687 00:44:08.000 --> 00:44:10.700 If you release it, false, if you touch it, true 688 00:44:10.700 --> 00:44:15.200 You can see that it is displayed like this 689 00:44:17.000 --> 00:44:20.600 Now, the same goes for hand triggers 690 00:44:20.600 --> 00:44:23.000 Also for the hand trigger 691 00:44:26.000 --> 00:44:29.000 In the case of hand triggers and grips, there is a grip and a grip axis 692 00:44:29.000 --> 00:44:32.000 and the axis is returned 693 00:44:32.000 --> 00:44:36.060 as a float value between 0 and 1 694 00:44:36.060 --> 00:44:37.820 This is True False 695 00:44:37.820 --> 00:44:41.220 and there is no touch in the case of the grip 696 00:44:41.220 --> 00:44:44.820 You can think of it as not being able to tell the extent 697 00:44:44.820 --> 00:44:46.480 of the touch of the button 698 00:44:47.200 --> 00:44:51.100 In the case of thumbstick buttons, X-Axis 699 00:44:51.100 --> 00:44:53.520 Only the left and right values of the X-axis are 700 00:44:53.520 --> 00:44:56.240 brought when the thumbstick is tilted from side to side 701 00:44:56.240 --> 00:44:59.000 only the value is brought separately 702 00:44:59.000 --> 00:45:01.440 when the X value is moved up and down 703 00:45:01.440 --> 00:45:05.000 or both XYs are brought in 704 00:45:05.000 --> 00:45:08.000 Vector 2D form with 2D axis 705 00:45:08.000 --> 00:45:10.540 By the way, I think we can find out about it here 706 00:45:10.540 --> 00:45:14.140 There are buttons and touch 707 00:45:14.140 --> 00:45:17.380 Touch means putting your finger on the thumbstick and taking it off 708 00:45:17.380 --> 00:45:20.760 It's the same as a trigger 709 00:45:20.760 --> 00:45:23.000 However, I didn't know that 710 00:45:23.000 --> 00:45:26.520 the thumbstick also had a button 711 00:45:26.520 --> 00:45:29.280 The thumbstick button is pressed 712 00:45:29.280 --> 00:45:32.000 like a button 713 00:45:32.000 --> 00:45:35.000 So when you want to use it in a way that you press it like a button 714 00:45:35.000 --> 00:45:38.580 you can use the thumbstick button 715 00:45:38.580 --> 00:45:40.860 Of course, the value of this is true or false 716 00:45:40.860 --> 00:45:43.720 Then there is the up and down left right 717 00:45:43.720 --> 00:45:47.000 Up, down, left, right is different from the X-axis 718 00:45:47.000 --> 00:45:50.400 And Y-axis mentioned earlier 719 00:45:50.400 --> 00:45:53.000 When raised upward, once when lowered 720 00:45:53.000 --> 00:45:56.000 Only once when lowered to the left goes to right 721 00:45:56.000 --> 00:45:59.000 So at one axis 722 00:45:59.000 --> 00:46:02.000 if one way X-axis is left and right 723 00:46:02.000 --> 00:46:05.000 when you try to receive input 724 00:46:05.000 --> 00:46:08.000 separately for left or right 725 00:46:08.000 --> 00:46:09.250 you can register 726 00:46:09.250 --> 00:46:12.400 multiple events like this 727 00:46:12.400 --> 00:46:15.020 You won't often use it this much 728 00:46:15.020 --> 00:46:17.000 but you can occasionally use it 729 00:46:17.000 --> 00:46:20.780 So, like a button 730 00:46:20.780 --> 00:46:23.240 Like a cross button, like a pad button on a joypad 731 00:46:23.240 --> 00:46:25.600 You can receive input like a button 732 00:46:25.600 --> 00:46:28.540 I think you should know like that 733 00:46:28.540 --> 00:46:32.000 The right hand is almost identical to the left 734 00:46:32.000 --> 00:46:35.800 The ones we haven't tried yet are the XY 735 00:46:35.800 --> 00:46:38.000 and menu buttons 736 00:46:38.000 --> 00:46:41.000 which only require clicking 737 00:46:41.000 --> 00:46:43.360 There is only true false when pressing and not pressing 738 00:46:43.360 --> 00:46:47.000 and in the case of XY, press and release are used 739 00:46:47.000 --> 00:46:50.660 In other words, press means pressing and releasing 740 00:46:50.660 --> 00:46:53.000 Touching is done by placing your finger on the button 741 00:46:53.000 --> 00:46:56.760 and releasing it rather than pressing it 742 00:46:56.760 --> 00:46:59.000 You can try these out 743 00:46:59.000 --> 00:47:02.000 yourself and 744 00:47:02.000 --> 00:47:05.400 find out what these buttons are and what they mean 745 00:47:05.400 --> 00:47:08.000 take a log of all of these things 746 00:47:08.000 --> 00:47:11.000 and practice by recording them 747 00:47:11.000 --> 00:47:13.460 all once to see 748 00:47:13.460 --> 00:47:16.160 how the actual action value comes out 749 00:47:16.160 --> 00:47:20.480 The right hand is just the opposite of the left hand 750 00:47:20.480 --> 00:47:24.480 so that you can implement the same for the right hand without difficulty 751 00:47:25.200 --> 00:47:29.520 I'll leave it at that for this time 752 00:47:29.520 --> 00:47:32.540 Next time, now that we can receive this input device 753 00:47:32.540 --> 00:47:35.560 we will try moving the player 754 00:47:35.560 --> 00:47:39.780 using this input 755 00:47:39.780 --> 00:47:44.480 Well, thank you for taking the time to listen to the lecture 756 00:47:44.480 --> 00:47:46.460 Thank you for your effort 757 00:47:46.720 --> 00:47:50.000 I will summarize what I learned in this lesson 758 00:47:50.000 --> 00:47:52.640 First, we confirmed that 759 00:47:52.646 --> 00:47:55.726 each button can receive various inputs 760 00:47:55.726 --> 00:47:58.900 such as press, touch, and axis 761 00:47:58.900 --> 00:48:03.360 and practiced outputting various input values ​​to the screen 762 00:48:03.360 --> 00:48:07.180 In particular, the thumbstick could receive input 763 00:48:07.180 --> 00:48:09.540 separately for each X-axis or Y-axis 764 00:48:09.540 --> 00:48:12.260 and the XY-axis 765 00:48:12.260 --> 00:48:16.060 Second, since each manufacturer has different standards 766 00:48:16.080 --> 00:48:18.900 for the camera height settings of HMD devices 767 00:48:18.900 --> 00:48:21.280 you must wear the headset 768 00:48:21.280 --> 00:48:24.660 and change the settings 769 00:48:24.660 --> 00:48:26.260 to check the height setting 770 00:48:26.260 --> 00:48:30.340 Thirdly, while wearing a VR headset 771 00:48:30.340 --> 00:48:33.920 I tried using the text render component 772 00:48:33.920 --> 00:48:35.400 to check the development log 773 00:48:35.400 --> 00:48:37.100 The text render component has 774 00:48:37.100 --> 00:48:39.780 the advantage of being able to output text directly to the world 775 00:48:39.780 --> 00:48:42.680 and because it is in the form of a component 776 00:48:42.680 --> 00:48:45.718 its size and position can be freely adjusted 777 00:48:45.718 --> 00:48:46.347 Creating a New Level Ready for development Create a new level in Unreal Editor by pressing [File] - [New Level] 778 00:48:46.347 --> 00:48:46.927 Once you've named your new level, save it to your Maps folder Create a new folder with the name “Blueprints” in Content Drawer 779 00:48:46.927 --> 00:48:47.487 Create a new Blueprint class file that inherits the Pawn class and set a name for it 780 00:48:47.493 --> 00:48:48.073 Create a new Blueprint class file that inherits the GameModeBase class and set its name 781 00:48:48.073 --> 00:48:48.598 Double-click the file to open the settings window and specify the file as the Default Pawn Class in the Details panel 782 00:48:48.598 --> 00:48:49.138 Open the Project Settings window and select the Maps & Modes tab Specifying the Default GameMode item as a created file 783 00:48:49.143 --> 00:48:49.727 Specify the Editor Startup Map and Game Default Map items to the corresponding files 784 00:48:49.727 --> 00:48:50.347 Creating a VR Player Pawn Setting up VR Player Pawn Double-click the created file to open the settings window and press [+Add] - [Camera] component 785 00:48:50.347 --> 00:48:50.907 [+Add] - Select the [MotionController] component and add "LeftMotionController" and add with two names: “RightMotionController” 786 00:48:50.907 --> 00:48:51.567 Add a Static Mesh component as a child component of Camera Component and set its name 787 00:48:51.567 --> 00:48:52.247 With the component selected, set the Static Mesh property of the Details panel to GenericHMD 788 00:48:52.247 --> 00:48:52.927 MotionController allows you to specify which device is tracking Go to the [Event BeginPlay] node in the Event Graph panel to track the position of the HMD device 789 00:48:52.927 --> 00:48:53.466 Connect the [Set Tracking Origin] node and set the Origin property value to Stage 790 00:48:53.466 --> 00:48:53.871 Use the [Is Head Mounted Display Enabled] node to check whether the HMD device is connected 791 00:48:53.871 --> 00:48:54.658 Get user input Setting up user input Create a new folder named “Inputs” in the content drawer 792 00:48:54.658 --> 00:48:55.199 Select [+Add] - [Input] - [Input Action] to create 3 Input Action files 793 00:48:55.199 --> 00:48:55.954 Select [+Add] - [Input] - [Input Mapping Context] and create a file 794 00:48:55.954 --> 00:48:56.554 Double-click the file to open the input settings window and assign the previously created Input Action files to the Mappings item 795 00:48:56.554 --> 00:48:57.034 Designate the Oculus Touch button to receive input for each Input Action. Play and confirm that text is output every time you press the bound input key 796 00:48:57.034 --> 00:48:57.734 Convert the input value to Touch (bool) or Axis1D (float) and perform an input value output test 797 00:48:57.734 --> 00:48:58.734 The End