WEBVTT 1 00:00:04.325 --> 00:00:08.925 Realistic Advanced VR Project Implementation 2 2 00:00:23.675 --> 00:00:27.175 Cognitive dissonance that can occur 3 00:00:27.175 --> 00:00:29.725 when moving using typical movement methods in VR 4 00:00:29.725 --> 00:00:33.525 In other words, we will take some time to experience the sensation of dizziness 5 00:00:33.525 --> 00:00:36.575 To prevent this cognitive dissonance 6 00:00:36.575 --> 00:00:38.475 we will directly implement the teleportation movement method 7 00:00:38.475 --> 00:00:42.375 which is commonly used in VR apps 8 00:00:42.375 --> 00:00:46.175 At this time 9 00:00:46.175 --> 00:00:48.425 to continuously display the location to teleport in real-time 10 00:00:48.425 --> 00:00:52.175 we will use a method that predicts the trajectory of a projectile 11 00:00:52.175 --> 00:00:54.825 when an object is thrown 12 00:00:54.825 --> 00:00:58.875 Drawing the movement prediction line 13 00:00:59.175 --> 00:01:04.475 We will use the right thumbstick for movement 14 00:01:05.425 --> 00:01:13.475 So first, go to the Inputs folder 15 00:01:13.475 --> 00:01:16.025 right-click 16 00:01:16.025 --> 00:01:18.425 and add an Input Action in the Inputs folder 17 00:01:18.425 --> 00:01:35.425 Name it IA_ThumbstickAxis_Right 18 00:01:35.425 --> 00:01:39.925 to create an Input Action 19 00:01:39.925 --> 00:01:42.225 that retrieves the thumbstick axis values for the right hand 20 00:01:42.225 --> 00:01:45.524 Of course, since it's an axis value, there will be X and Y 21 00:01:45.524 --> 00:01:50.500 So I'll receive it as Axis 2D 22 00:01:53.124 --> 00:01:58.774 and then I'll add this value 23 00:01:58.774 --> 00:02:01.474 as a mapping in the Input Mapping Context 24 00:02:01.474 --> 00:02:04.024 Click on the plus sign to add one 25 00:02:04.024 --> 00:02:15.374 and here I'll add IA_ThumbstickAxis_Right 26 00:02:15.374 --> 00:02:21.474 The Oculus Touch controller has 27 00:02:21.474 --> 00:02:25.274 a Thumbstick 2D-Axis on the right side 28 00:02:25.274 --> 00:02:27.974 So I'll retrieve the 2D-Axis 29 00:02:36.374 --> 00:02:41.774 Shall we also implement the default movement method while we're at it? 30 00:02:43.074 --> 00:02:47.424 Let's open the HunetVRPlayer Pawn 31 00:02:47.424 --> 00:02:51.124 Last time we were working on the Player Pawn, right? 32 00:02:51.124 --> 00:02:59.324 Let's add 33 00:02:59.324 --> 00:03:01.624 the IA_ThumbstickAxis_Right event here 34 00:03:06.974 --> 00:03:09.224 If we're using 35 00:03:09.224 --> 00:03:11.724 the typical movement method we've been using 36 00:03:11.724 --> 00:03:15.624 then whenever Triggered 37 00:03:15.624 --> 00:03:21.624 we'll use Set Actor Location to specify a position 38 00:03:21.624 --> 00:03:23.774 and move the actor there 39 00:03:25.824 --> 00:03:30.324 However, in this typical movement method 40 00:03:30.324 --> 00:03:32.474 we'll take the direction 41 00:03:32.474 --> 00:03:34.174 we're pointing the thumbstick 42 00:03:34.174 --> 00:03:38.374 and get the Action Value as a Vector 43 00:03:38.374 --> 00:03:42.524 Let's split this Vector structure 44 00:03:42.524 --> 00:03:45.124 When we split it, we'll get separate X and Y values 45 00:03:45.124 --> 00:03:49.424 So, the Y value from the thumbstick represents the up and down movements 46 00:03:49.424 --> 00:03:51.974 X from the thumbstick represents left and right movements 47 00:03:51.974 --> 00:03:55.279 So, the up and down value should go into the Z axis 48 00:03:55.279 --> 00:03:59.529 and the left and right value (X) should go into the Y axis 49 00:03:59.529 --> 00:04:03.360 Split the New Location as well 50 00:04:03.360 --> 00:04:09.174 The X value will go into the Y axis, representing left and right 51 00:04:09.174 --> 00:04:11.974 Then, the Y value from the thumbstick 52 00:04:11.974 --> 00:04:17.124 which indicates forward and backward movement for the player 53 00:04:17.124 --> 00:04:19.024 will go into the X axis 54 00:04:20.624 --> 00:04:22.474 However, we can't just put it in directly 55 00:04:22.474 --> 00:04:25.524 If we put it in directly, it would start from the origin 56 00:04:25.524 --> 00:04:32.224 So, first, get the Actor Location value 57 00:04:32.224 --> 00:04:36.524 use Make Vector to create a new vector 58 00:04:36.524 --> 00:04:41.974 where X goes into Y and Y goes into X 59 00:04:41.974 --> 00:04:51.774 then add these two values together 60 00:04:51.774 --> 00:05:04.724 Normalize this value first 61 00:05:07.424 --> 00:05:10.723 then convert it to Float by multiplying it 62 00:05:10.723 --> 00:05:13.523 to set the movement speed to around 600 63 00:05:15.273 --> 00:05:22.573 Then recombine this value here 64 00:05:22.573 --> 00:05:27.273 pass it as a Vector like this, compile, save 65 00:05:30.173 --> 00:05:31.923 This is basically using 66 00:05:31.923 --> 00:05:33.923 the typical character movement method 67 00:05:33.923 --> 00:05:35.673 we've been using so far 68 00:05:35.673 --> 00:05:42.473 Except instead of using the W, S, A, D keys on the keyboard 69 00:05:42.473 --> 00:05:45.173 we've translated that into the X and Y axis values 70 00:05:45.173 --> 00:05:47.673 from the thumbstick 71 00:05:48.273 --> 00:05:52.023 If we do it this way, the movement itself should work fine 72 00:05:53.673 --> 00:05:56.873 You raise your right hand 73 00:05:59.073 --> 00:06:03.273 and move it forward and backward 74 00:06:03.273 --> 00:06:05.623 with the object floating in the air 75 00:06:05.623 --> 00:06:07.523 set to Z value of 0 76 00:06:07.523 --> 00:06:10.123 If you set the Z value to the current position value 77 00:06:10.123 --> 00:06:13.573 anyway, currently moving forward will result in movement 78 00:06:13.573 --> 00:06:18.973 The current Z value seems to be causing some issues 79 00:06:18.973 --> 00:06:23.760 So, I'll normalize it to adjust the position 80 00:06:25.023 --> 00:06:28.273 I'll normalize the vector 81 00:06:28.273 --> 00:06:33.023 then multiply this normalized value 82 00:06:33.023 --> 00:06:38.623 by the speed 83 00:06:38.623 --> 00:06:43.923 and add it here to pass the combined value 84 00:06:43.923 --> 00:06:47.373 That way it will be P = P₀ + Vt 85 00:06:48.623 --> 00:06:50.623 Compile, save 86 00:06:56.440 --> 00:07:02.023 and then the speed is incredibly fast at 600 87 00:07:02.023 --> 00:07:06.673 so I can confirm it moves forward and backward well 88 00:07:10.673 --> 00:07:13.823 Maybe the speed value here is too high right now 89 00:07:13.823 --> 00:07:18.523 So, even giving it around 100 should be sufficient 90 00:07:18.523 --> 00:07:22.573 but even at 50 91 00:07:30.523 --> 00:07:34.223 it seems quite fast 92 00:07:34.223 --> 00:07:40.373 It moves well with left hand 93 00:07:43.023 --> 00:07:43.923 and right hand controls like this 94 00:07:43.923 --> 00:07:47.323 However, once you start using it 95 00:07:47.323 --> 00:07:49.323 you might find it quite dizzying 96 00:07:49.323 --> 00:07:52.573 Because the speed perceived by our ears 97 00:07:52.573 --> 00:07:54.673 and the speed perceived by our eyes need to match 98 00:07:54.673 --> 00:07:58.573 Because our ears don't sense speed 99 00:07:58.573 --> 00:08:01.423 but if our visual information keeps suggesting movement 100 00:08:01.423 --> 00:08:02.623 while we're actually still 101 00:08:02.623 --> 00:08:04.873 it can confuse the brain 102 00:08:04.873 --> 00:08:07.473 To prevent that confusion 103 00:08:07.473 --> 00:08:12.123 teleporting to a specified location instantly 104 00:08:12.123 --> 00:08:15.273 is considered 105 00:08:15.273 --> 00:08:18.673 a more common method in VR 106 00:08:18.673 --> 00:08:25.223 So, I'll separate this part into a separate function 107 00:08:25.223 --> 00:08:27.373 Since you might use it later 108 00:08:27.373 --> 00:08:32.522 I'll name this section 'Normal Move' 109 00:08:32.522 --> 00:08:36.722 I'll create a function named 'NormalMove' 110 00:08:36.722 --> 00:08:39.122 First, we need to receive input values 111 00:08:39.122 --> 00:08:42.822 so let's add an input parameter here 112 00:08:44.972 --> 00:08:48.272 So, let's call it Input Value 113 00:08:50.972 --> 00:08:56.822 And the type we're receiving should be Vector 2D. It should be in vector form 114 00:08:58.640 --> 00:09:02.190 Vector 2D instead of 3D 115 00:09:03.772 --> 00:09:05.472 We have the Vector 2D Structure 116 00:09:05.472 --> 00:09:07.372 for this change 117 00:09:09.972 --> 00:09:13.822 So, let's receive Input Value as a Vector 2D 118 00:09:13.822 --> 00:09:15.872 Next, in the Event Graph 119 00:09:15.872 --> 00:09:20.679 let's cut these nodes with Ctrl + X 120 00:09:20.679 --> 00:09:23.472 paste them into the Normal Move function 121 00:09:23.472 --> 00:09:26.122 with Ctrl + V 122 00:09:27.572 --> 00:09:33.072 and then split them 123 00:09:33.072 --> 00:09:38.672 so that X goes into Y and Y goes into X as we discussed 124 00:09:38.672 --> 00:09:43.272 I'll move these nodes a bit lower, down here 125 00:09:43.272 --> 00:09:46.822 and connect the execution pin to Set Actor like this 126 00:09:50.572 --> 00:09:53.372 So, if you want to use this 127 00:09:53.372 --> 00:09:56.122 you would place it like this 128 00:09:56.122 --> 00:10:03.022 and recombine the input 129 00:10:03.022 --> 00:10:05.422 when Triggered to pass it like this 130 00:10:05.422 --> 00:10:08.122 implementing it this way 131 00:10:08.672 --> 00:10:10.872 So, you want it to stop when Completed as well 132 00:10:10.872 --> 00:10:15.122 If you place Action Value like this 133 00:10:15.122 --> 00:10:17.072 when Completed 134 00:10:19.322 --> 00:10:22.672 it should streamline the functionality 135 00:10:22.672 --> 00:10:26.922 while still working well 136 00:10:32.222 --> 00:10:35.472 But as I mentioned earlier, this can be quite disorienting 137 00:10:35.472 --> 00:10:39.222 So, let's not use the Normal Move method 138 00:10:39.222 --> 00:10:41.722 Instead, let's delete it by pressing the Delete key 139 00:10:42.872 --> 00:10:47.522 We'll use the Teleport method instead 140 00:10:47.522 --> 00:10:50.722 In the Teleport method 141 00:10:50.722 --> 00:10:53.922 Unreal Engine provides a way 142 00:10:53.922 --> 00:10:57.672 to predict projectile curves 143 00:10:57.672 --> 00:11:01.622 So, using this 144 00:11:01.622 --> 00:11:10.772 you would search for 'Predict Projectile Path' in the node search 145 00:11:11.722 --> 00:11:14.422 There are various options like ObjectType, TraceChannel 146 00:11:14.422 --> 00:11:17.572 and Advanced methods available 147 00:11:17.572 --> 00:11:20.872 Let's try the TraceChannel method first 148 00:11:20.872 --> 00:11:22.822 Using the TraceChannel method 149 00:11:26.472 --> 00:11:32.622 in Predict Projectile 150 00:11:32.622 --> 00:11:35.372 when drawing the curve 151 00:11:35.372 --> 00:11:39.322 it should stop if it hits something 152 00:11:39.322 --> 00:11:42.872 So, the Advanced method 153 00:11:42.872 --> 00:11:45.172 allows you to specify both 154 00:11:45.172 --> 00:11:46.922 ObjectType allows collision detection 155 00:11:46.922 --> 00:11:49.689 only with specified object types 156 00:11:49.689 --> 00:11:51.489 TraceChannel specifically performs collision checks 157 00:11:51.489 --> 00:11:54.972 using visibility and camera channels 158 00:11:54.972 --> 00:11:58.221 in the TraceChannel method 159 00:11:58.221 --> 00:11:59.321 get it? 160 00:11:59.321 --> 00:12:03.121 We'll go with the TraceChannel Visibility Channel search method 161 00:12:03.121 --> 00:12:07.221 for a more concise implementation 162 00:12:09.971 --> 00:12:12.221 Then first, we need to make sure 163 00:12:12.221 --> 00:12:14.271 the line is drawn correctly 164 00:12:14.271 --> 00:12:15.921 I will start drawing 165 00:12:15.921 --> 00:12:17.871 from the position of the right hand 166 00:12:17.871 --> 00:12:21.821 When you use the Right Montion Controller 167 00:12:21.821 --> 00:12:25.721 to Get Location, you’ll see Get World Location 168 00:12:25.721 --> 00:12:28.921 So, you’ll do Get World Location 169 00:12:28.921 --> 00:12:32.121 and this position will be the starting point 170 00:12:33.471 --> 00:12:35.671 So, if you were to throw a virtual projectile 171 00:12:35.671 --> 00:12:37.171 it’s about drawing how it would fly 172 00:12:37.171 --> 00:12:39.821 while drawing a curve 173 00:12:39.821 --> 00:12:42.421 Velocity, when I said how much force 174 00:12:42.421 --> 00:12:45.721 and in which direction will you throw 175 00:12:45.721 --> 00:12:48.921 I'm going to throw in the front direction of the Motion Controller 176 00:12:48.921 --> 00:12:53.821 and the Forward Vector direction 177 00:12:56.571 --> 00:12:58.871 But at this point, since the Forward Vector has a magnitude of 1 178 00:12:58.871 --> 00:13:02.471 the power will be too weak 179 00:13:02.471 --> 00:13:04.171 So, to make the power stronger 180 00:13:04.171 --> 00:13:07.521 I’ll add a variable here 181 00:13:07.521 --> 00:13:16.621 So, I’ll call it Teleport power 182 00:13:18.171 --> 00:13:20.071 I’ll make this power a Float variable 183 00:13:21.821 --> 00:13:24.321 so that as the power increases, the teleportation distance also increases 184 00:13:24.321 --> 00:13:29.440 The data type will be Float 185 00:13:29.440 --> 00:13:32.190 Let’s compoile first to get the default values 186 00:13:32.190 --> 00:13:35.990 and then I’ll set the power 187 00:13:35.990 --> 00:13:39.521 to around 650 once we see them 188 00:13:41.721 --> 00:13:46.071 So, we’ll multiply the Teleport Power 189 00:13:46.071 --> 00:13:48.121 by the Forward Vector 190 00:13:48.121 --> 00:13:50.721 after getting the Teleport Power and Forward Vector 191 00:13:54.221 --> 00:13:59.421 We’ll multiply these to get the product 192 00:13:59.421 --> 00:14:01.971 which will then be passed as the velocity value 193 00:14:06.621 --> 00:14:11.121 Next, we’ll determine the thickness of the projectile 194 00:14:11.121 --> 00:14:14.621 So, we’ll set the size of the projectile 195 00:14:14.621 --> 00:14:17.121 to about 30 units 196 00:14:17.121 --> 00:14:23.071 Since the capsule is approximately 30 cm in radius 197 00:14:23.071 --> 00:14:27.621 we’ll match the size 198 00:14:27.621 --> 00:14:30.320 to that of the capsule 199 00:14:30.320 --> 00:14:33.570 And the channel we’re looking for is 200 00:14:33.570 --> 00:14:36.270 the Visibility Channel 201 00:14:36.270 --> 00:14:38.671 it’ll prevent 202 00:14:38.671 --> 00:14:41.721 further teleportation 203 00:14:41.721 --> 00:14:44.571 acting as a blocker 204 00:14:45.421 --> 00:14:49.121 Next, when checking for collisions 205 00:14:49.121 --> 00:14:51.921 I shouldn’t collide with myself 206 00:14:51.921 --> 00:14:55.221 as the player 207 00:14:55.221 --> 00:15:01.921 So, let’s create an array using Make Array 208 00:15:01.921 --> 00:15:05.721 and I’ll pass this array here 209 00:15:05.721 --> 00:15:10.921 So, using Self as the Actor 210 00:15:10.921 --> 00:15:14.571 we’ll set Reference Self as the Ignore Actor 211 00:15:14.571 --> 00:15:17.821 to ensure collision processing ignores oneself 212 00:15:18.971 --> 00:15:21.921 We’ll continue displaying this projectile 213 00:15:21.921 --> 00:15:24.371 when we press the button 214 00:15:24.371 --> 00:15:28.370 So, let’s first debug to make sure 215 00:15:28.370 --> 00:15:30.070 the line is drawn correctly 216 00:15:30.820 --> 00:15:34.420 So, we’ll draw it for just one frame to check 217 00:15:34.420 --> 00:15:36.420 if it’s working correctly 218 00:15:36.420 --> 00:15:39.020 Since it’ll be continuously drawn while the button is held down 219 00:15:39.020 --> 00:15:43.070 we’ll keep it drawing repeatedly 220 00:15:43.070 --> 00:15:46.570 Next, there’s the frequence parameter 221 00:15:46.570 --> 00:15:50.870 This determines 222 00:15:50.870 --> 00:15:54.070 how long the simulation will draw for 223 00:15:54.070 --> 00:15:57.920 Let’s set it to around 15 seconds for the simulation duration 224 00:16:00.520 --> 00:16:02.570 The rest doesn’t seem to need any adjustments for now 225 00:16:02.570 --> 00:16:05.470 Let’s first cheeck if everything works correctly in this state 226 00:16:05.470 --> 00:16:09.820 Compile, save 227 00:16:14.470 --> 00:16:18.620 and test the predictive line during gameplay 228 00:16:18.970 --> 00:16:24.820 If you move the thumbstick, how does it appear? 229 00:16:24.820 --> 00:16:27.670 Right now, you can see the large capsules 230 00:16:27.670 --> 00:16:30.970 drawing lines as they move 231 00:16:32.420 --> 00:16:35.320 The capsules are too thick, considering they’re 30 cm 232 00:16:35.320 --> 00:16:39.720 So, when you press the button, it draws 233 00:16:41.320 --> 00:16:46.150 and when you release it 234 00:16:46.150 --> 00:16:50.900 if you tilt the thumbstick in any direction 235 00:16:50.920 --> 00:16:54.620 it draws lines in that direction, following where your hand points 236 00:16:54.620 --> 00:16:57.670 So, you’ve confirmed that the lines are drawing correctly now 237 00:17:01.420 --> 00:17:04.720 It seems like the lines were quite thick 238 00:17:04.720 --> 00:17:08.470 But we don’t intend to draw those debug lines 239 00:17:08.470 --> 00:17:11.570 we actualy want the user to see them 240 00:17:11.570 --> 00:17:13.970 as visible lines 241 00:17:13.970 --> 00:17:17.620 So, let’s change Debug to None for now 242 00:17:17.620 --> 00:17:19.970 and we won’t draw those debug lines anymore 243 00:17:19.970 --> 00:17:22.170 Let’s reduce the Projectile Radius 244 00:17:22.170 --> 00:17:27.020 to around 15 or even 10, since it seemed too large earlier 245 00:17:30.720 --> 00:17:34.470 So, you saw those circles drawn earlier 246 00:17:34.470 --> 00:17:36.820 in green like that 247 00:17:36.820 --> 00:17:38.920 When the circles are drawn 248 00:17:38.920 --> 00:17:42.270 their coordinates will be returned 249 00:17:42.270 --> 00:17:45.970 as an array called Path Positions 250 00:17:45.970 --> 00:17:49.920 So, we’ll use this array of vectors 251 00:17:49.920 --> 00:17:53.470 to draw the picture along this line 252 00:17:53.470 --> 00:17:57.470 Displaying Niagara Effect 253 00:17:57.870 --> 00:18:02.620 I’m going to use Niagara Effect 254 00:18:02.620 --> 00:18:05.620 to make it look more visually appealing this time 255 00:18:05.620 --> 00:18:12.170 If you use “Player - Add” 256 00:18:12.170 --> 00:18:15.570 you’ll find a component 257 00:18:15.570 --> 00:18:17.020 called Niagara Particle System Component 258 00:18:17.020 --> 00:18:20.120 Add a Niagara Particle System Component 259 00:18:20.120 --> 00:18:27.920 Let’s name it Teleport Line 260 00:18:31.020 --> 00:18:34.420 If you go to the right in this Teleport Line 261 00:18:34.420 --> 00:18:39.620 you’ll see the Niagara System Asset 262 00:18:39.620 --> 00:18:42.270 Here, if you click on it 263 00:18:42.270 --> 00:18:48.069 you’ll find the default line that was included in the VR template 264 00:18:48.069 --> 00:18:50.669 Let’s reuse that 265 00:18:50.669 --> 00:18:53.569 by assigning it to our Teleport Line 266 00:18:53.569 --> 00:18:56.519 So, we’l use the effect file named 267 00:18:56.519 --> 00:18:59.479 TeleportTrace 268 00:18:59.479 --> 00:19:01.719 If you click the folder icon below 269 00:19:01.719 --> 00:19:03.269 the original location will appear 270 00:19:03.269 --> 00:19:07.160 It’s in the folder called VFX in the VR template 271 00:19:07.160 --> 00:19:09.910 Shall we take a look at what the effect looks like? 272 00:19:09.910 --> 00:19:14.619 I’ll double-click it to open and take a look 273 00:19:14.619 --> 00:19:18.219 Then, if you look here, it’s this kind of line 274 00:19:18.219 --> 00:19:20.719 There’s like a slight rainbow colored line 275 00:19:20.719 --> 00:19:22.819 But if you take a look here 276 00:19:22.819 --> 00:19:25.219 the length of this line is determined by 277 00:19:25.219 --> 00:19:30.569 if you go to the tab called User Parameters 278 00:19:30.569 --> 00:19:32.919 there’s a variable called Point Array 279 00:19:32.919 --> 00:19:34.319 and there are some values 280 00:19:34.319 --> 00:19:38.469 So if you change this value to a different one 281 00:19:38.469 --> 00:19:41.519 the 0th position will be the starting point 282 00:19:41.519 --> 00:19:44.219 The 1st point will be around here, the 2nd point around here, and the 3rd point will 283 00:19:44.219 --> 00:19:45.719 bend like this 284 00:19:45.719 --> 00:19:51.319 If you change, for example 285 00:19:51.319 --> 00:19:53.169 the 4th point to a different value, what happens? 286 00:19:53.169 --> 00:19:55.869 The line would twist or become tangled in this manner 287 00:19:55.869 --> 00:19:57.819 It seems to come from over there like this 288 00:19:57.819 --> 00:20:00.219 From this side, it goes like this 289 00:20:00.219 --> 00:20:02.319 It looks like the last number is at the very first position 290 00:20:02.319 --> 00:20:06.569 So if you increase this to 150 291 00:20:06.569 --> 00:20:11.219 it’ll move to a higher position like this 292 00:20:11.219 --> 00:20:15.419 So, in the end, what we need to do is 293 00:20:15.419 --> 00:20:19.819 to pass the actual vector coordinates 294 00:20:19.819 --> 00:20:23.119 that we want to draw into this array 295 00:20:23.119 --> 00:20:26.569 called Point Array 296 00:20:26.569 --> 00:20:28.969 in the User Parameters of the Niagara Effect 297 00:20:30.019 --> 00:20:32.619 So, first, I’ll delete all of them 298 00:20:32.619 --> 00:20:35.719 and then I’ll leave just two I’ll set them to 0, 0 299 00:20:35.719 --> 00:20:37.669 Then they won’t be drawn on the screen 300 00:20:37.669 --> 00:20:39.569 But if you draw something like this here 301 00:20:39.569 --> 00:20:43.219 it’ll appear on the screen like this 302 00:20:43.219 --> 00:20:46.169 in this manner 303 00:20:48.219 --> 00:20:50.819 We’ll set it to 0, 0, 0 initially 304 00:20:50.819 --> 00:20:55.069 so nothing is drawn at first 305 00:20:55.069 --> 00:20:57.669 Then, we’ll make the line appear only when we move the thumbstick 306 00:20:57.669 --> 00:21:01.069 First, compile and save 307 00:21:01.069 --> 00:21:04.419 Right now, it’s trying to draw the Teleport Effect 308 00:21:04.419 --> 00:21:06.219 but since all the values are 0, 0 309 00:21:06.219 --> 00:21:10.769 it’s showing an exclamation mark 310 00:21:10.769 --> 00:21:12.119 However, it’s not a major issue 311 00:21:12.119 --> 00:21:14.569 I’ll save it in this state for now 312 00:21:18.079 --> 00:21:21.679 It’s probably due to the TeleportColor animation 313 00:21:21.679 --> 00:21:23.229 It’s because of this 314 00:21:23.229 --> 00:21:26.819 but you don’t need to worry too much about it 315 00:21:26.819 --> 00:21:29.469 First, go to HunterPlayer 316 00:21:32.619 --> 00:21:37.569 and we attached the Teleport Trace effect 317 00:21:37.569 --> 00:21:40.919 to the Teleport Line earlier 318 00:21:40.919 --> 00:21:43.669 So, we just need to pass this array 319 00:21:43.669 --> 00:21:46.219 to the User Parameters here 320 00:21:46.219 --> 00:21:49.669 So, from the Teleport Line 321 00:22:00.019 --> 00:22:02.119 we’ll use the Niagara Set Vector Array 322 00:22:02.119 --> 00:22:05.719 Select the Niagara Set Vector Array 323 00:22:09.069 --> 00:22:11.869 When the projectile array is drawn 324 00:22:11.869 --> 00:22:16.318 we’ll pass its value to this Niagara component 325 00:22:16.318 --> 00:22:18.118 But earlier, we need to use the name of the User Parameters 326 00:22:18.118 --> 00:22:21.618 which is Point Array 327 00:22:21.618 --> 00:22:23.968 Just to be sure 328 00:22:23.968 --> 00:22:26.118 I’ll copy the name exactly as it appears here 329 00:22:28.918 --> 00:22:30.968 Right-click here 330 00:22:30.968 --> 00:22:34.568 choose Rename, and by pressing Ctrl+C 331 00:22:34.568 --> 00:22:36.318 I will copy the name 332 00:22:38.768 --> 00:22:41.218 And then Ctrl+V 333 00:22:41.218 --> 00:22:43.218 to paste like this 334 00:22:49.368 --> 00:22:51.668 Compile and save 335 00:22:51.668 --> 00:22:54.268 Debug mode is turned off, set to None 336 00:22:54.268 --> 00:22:57.268 And then 337 00:22:57.268 --> 00:22:59.368 we passed the calculated position values 338 00:22:59.368 --> 00:23:01.640 to Niagara as an array 339 00:23:01.640 --> 00:23:04.618 Let’s take a look at how it looks now 340 00:23:04.618 --> 00:23:08.968 I’ll press PLAY 341 00:23:09.618 --> 00:23:12.568 and move the right thumbstick to see how it works 342 00:23:12.568 --> 00:23:15.368 Then you should see the line being drawn 343 00:23:15.368 --> 00:23:18.518 as you move the thumbstick in this direction 344 00:23:18.518 --> 00:23:21.968 You can see that line continues to be drawn like this 345 00:23:21.968 --> 00:23:26.218 Since we don’t instruct it to erase the line when the button is released 346 00:23:26.218 --> 00:23:28.318 you’ll see the line remaining in its current state 347 00:23:28.318 --> 00:23:30.168 Next, if you draw like this 348 00:23:30.168 --> 00:23:32.518 and then move thumbstick 349 00:23:32.518 --> 00:23:35.618 you’ll see the line remaining in its current state 350 00:23:39.468 --> 00:23:44.968 First, if you feel the line is too thin 351 00:23:44.968 --> 00:23:48.518 select the TeleportColor here 352 00:23:52.518 --> 00:23:55.518 There should be an option called Bean Width here 353 00:23:55.518 --> 00:23:57.618 Beam Width controls the width of the beam 354 00:23:57.618 --> 00:23:59.768 We’re currently using the Beam Effect 355 00:23:59.768 --> 00:24:05.368 and if you’re looking at the Beam Width 356 00:24:05.368 --> 00:24:07.518 in the Details Panel 357 00:24:07.518 --> 00:24:09.868 it ranges from 358 00:24:09.868 --> 00:24:14.918 0 to 3.5 for thickness 359 00:24:14.918 --> 00:24:17.568 It seems to have a design where the middle is slightly thicker 360 00:24:17.568 --> 00:24:20.618 and it tapers thinner towards the ends 361 00:24:20.618 --> 00:24:24.968 So instead of just leaving it like this 362 00:24:24.968 --> 00:24:29.718 set the value here to 3 363 00:24:32.768 --> 00:24:37.318 The height should be 3 364 00:24:41.068 --> 00:24:46.818 Set the slope back to 0 and also set this to 3 365 00:24:48.268 --> 00:24:52.168 If you flatten the slope like this 366 00:24:52.168 --> 00:24:55.768 it’ll just be straight and even, so it should be 3,3 367 00:24:55.768 --> 00:24:59.068 If you connect it all straight to 3cm 368 00:24:59.068 --> 00:25:02.718 the line will probably appear thicker 369 00:25:02.718 --> 00:25:04.818 Compile and save 370 00:25:11.418 --> 00:25:15.818 Now the line has definitely become thicker compared to before 371 00:25:15.818 --> 00:25:19.168 and it’s consistent in thickness because it’s set to 3 372 00:25:19.168 --> 00:25:22.018 You can see that it’s drawing consistenly 373 00:25:22.018 --> 00:25:25.868 with the same thickness throughout 374 00:25:25.868 --> 00:25:28.568 not just thicker in the middle but uniformly 3cm thick 375 00:25:32.168 --> 00:25:37.717 But as the line extends further 376 00:25:37.717 --> 00:25:42.017 without some indication of where I’m moving towards 377 00:25:42.017 --> 00:25:44.917 it can be difficult to grasp my actual orientation 378 00:25:44.917 --> 00:25:46.867 just from the line 379 00:25:46.867 --> 00:25:51.017 So, add another Niagara Particle Ssytem Component here 380 00:25:51.017 --> 00:25:54.967 for the Niagara Effect 381 00:25:54.967 --> 00:26:00.217 This is for the teleport destination 382 00:26:00.217 --> 00:26:04.167 so let’s name it “Destination” 383 00:26:06.167 --> 00:26:08.817 Add another Niagara Component 384 00:26:08.817 --> 00:26:12.117 named “Teleport Destination” 385 00:26:12.117 --> 00:26:18.717 I’ll add the effect called “Teleport Ring” 386 00:26:18.717 --> 00:26:21.417 to the Niagara Component 387 00:26:21.817 --> 00:26:24.417 If you click on the folder 388 00:26:24.417 --> 00:26:28.867 you’ll find that the Teleport Ring effect looks something like this 389 00:26:28.867 --> 00:26:34.017 it creates a circular effect 390 00:26:34.017 --> 00:26:37.517 that could indicate an arrival point 391 00:26:37.517 --> 00:26:41.167 So, we’ll display this effect 392 00:26:45.017 --> 00:26:48.017 We’ll check “Set World Location” 393 00:26:51.667 --> 00:27:03.767 for the Teleport Destination position 394 00:27:04.967 --> 00:27:07.517 For the position 395 00:27:07.517 --> 00:27:11.717 it should be the last point in this Array Data 396 00:27:11.717 --> 00:27:13.717 which will be the destination point 397 00:27:16.917 --> 00:27:20.867 Here, you can see 398 00:27:20.867 --> 00:27:23.417 there’s a Last Destination under Trace 399 00:27:23.417 --> 00:27:26.317 We’ll pass this position to New Location here for the Last Destination 400 00:27:26.317 --> 00:27:29.967 Take a moment to organize the line 401 00:27:41.417 --> 00:27:45.217 By setting up like this and compiling and saving 402 00:27:45.217 --> 00:27:49.517 the “Teleport Destination” should now 403 00:27:49.517 --> 00:27:53.117 follow along at the end of this line 404 00:27:53.117 --> 00:27:54.967 Let’s test it out 405 00:27:56.117 --> 00:28:03.467 Then you should see a circle marker 406 00:28:03.467 --> 00:28:06.467 always appearing at the end point now 407 00:28:06.467 --> 00:28:12.067 But when you release, this marker should disappear 408 00:28:12.067 --> 00:28:13.267 So let’s add the functionality for it to disappear 409 00:28:13.267 --> 00:28:16.767 when released 410 00:28:16.767 --> 00:28:20.767 Implementing of the Teleport feature 411 00:28:21.367 --> 00:28:24.117 Since the line is quite complex 412 00:28:27.316 --> 00:28:31.367 let’s push back this part slightly 413 00:28:32.567 --> 00:28:35.017 and we need to know the position when it’s released 414 00:28:35.017 --> 00:28:39.117 So, currently, we’re only capturing this position 415 00:28:39.117 --> 00:28:41.319 when it’s triggered 416 00:28:41.319 --> 00:28:44.467 meaning when it’s completed, we can’t know this value 417 00:28:44.467 --> 00:28:46.417 We can’t retrieve this value 418 00:28:46.417 --> 00:28:50.117 So, let’s store this value in a variable 419 00:28:52.167 --> 00:28:53.617 Should we create a variable for this? 420 00:28:53.617 --> 00:28:56.867 Let’s add a variable 421 00:28:59.866 --> 00:29:09.066 and name it “Destination Location” 422 00:29:09.066 --> 00:29:11.916 We’ll change the data type to Vector 423 00:29:11.916 --> 00:29:15.216 for the destination location variable 424 00:29:16.516 --> 00:29:20.566 Compile and save 425 00:29:20.566 --> 00:29:25.016 So, we’ll continue to set the Destination Location 426 00:29:25.016 --> 00:29:29.216 to be the same as 427 00:29:29.216 --> 00:29:30.666 the position of the Teleport and Teleport Ring 428 00:29:31.816 --> 00:29:35.066 Let’s assign this value here as well 429 00:29:41.266 --> 00:29:44.416 We’ll connect it like this to make sure it’s linked properly 430 00:29:44.416 --> 00:29:48.416 So, the last position will be 431 00:29:48.416 --> 00:29:51.866 set to the position of the Teleport Ring 432 00:29:51.866 --> 00:29:55.216 and we’ll also save that position in a variable 433 00:29:57.266 --> 00:30:02.116 So, when it’s completed 434 00:30:02.116 --> 00:30:05.666 we should actually do what? We need to erase the line 435 00:30:05.666 --> 00:30:17.466 Therefore, if you search for 436 00:30:17.466 --> 00:30:23.216 “Set Vector Array” in Teleport Line 437 00:30:23.216 --> 00:30:27.066 you’ll find the Niagara Set Vector Array node 438 00:30:27.966 --> 00:30:31.766 To be safe, let’s copy the name of the point from earlier 439 00:30:31.766 --> 00:30:33.566 To avoid typos 440 00:30:33.566 --> 00:30:35.616 let’s copy and paste “Point Array” 441 00:30:35.616 --> 00:30:39.566 as the name for the User parameters here 442 00:30:39.566 --> 00:30:42.466 Next, we should clear out the Array Data 443 00:30:42.466 --> 00:30:48.066 So, use “Make Array” 444 00:30:48.066 --> 00:30:53.366 to pass this empty array 445 00:30:55.116 --> 00:30:58.816 So, we’ll do this when it’s completed first 446 00:30:58.816 --> 00:31:06.316 Then we should hide 447 00:31:06.316 --> 00:31:07.816 the Teleport Ring and Destination Ring as well 448 00:31:07.816 --> 00:31:15.716 So, connect the execution pin to Set Visibility for this 449 00:31:15.716 --> 00:31:18.216 Set Visibility will be set to False 450 00:31:18.216 --> 00:31:21.516 Then, since the Visibility is off, it's not visible 451 00:31:23.016 --> 00:31:28.716 Then, I'll move the Actor later 452 00:31:28.716 --> 00:31:30.866 And stop at this point first 453 00:31:30.866 --> 00:31:32.966 I'm going to off Set Visibility 454 00:31:32.966 --> 00:31:35.116 If you turn off the Set Visibility here 455 00:31:35.116 --> 00:31:38.166 When you click it again 456 00:31:38.166 --> 00:31:40.366 Since Visibility is off 457 00:31:40.366 --> 00:31:43.016 Even though you change 458 00:31:43.016 --> 00:31:45.116 the Set Position to 459 00:31:45.116 --> 00:31:46.916 Teleport Destination 460 00:31:46.916 --> 00:31:50.216 The Destination position will not be seen 461 00:31:50.216 --> 00:31:52.316 Because Visibility is off 462 00:31:52.316 --> 00:31:56.866 So, before changing Location 463 00:32:05.166 --> 00:32:11.016 When you draw the line that turns on Set Visibility 464 00:32:11.016 --> 00:32:13.166 You have to turn on Teleport Ring again, too 465 00:32:13.166 --> 00:32:17.066 So, I will check Visibility 466 00:32:17.066 --> 00:32:19.666 to True state 467 00:32:24.765 --> 00:32:28.465 So that I can make this to move there 468 00:32:31.665 --> 00:32:33.965 Compile, and save 469 00:32:34.815 --> 00:32:37.115 I'm going to test 470 00:32:37.115 --> 00:32:39.760 whether the line is well drawn and erased 471 00:32:39.760 --> 00:32:42.810 Press Play button 472 00:32:43.715 --> 00:32:48.265 When you move the Thumbstick 473 00:32:49.465 --> 00:32:51.765 and when it's on moving state 474 00:32:51.765 --> 00:32:53.815 it is shown on the screen 475 00:32:53.815 --> 00:32:55.665 When you take off your hand from Thumbstick 476 00:32:55.665 --> 00:32:58.815 The line gets erased 477 00:32:58.815 --> 00:33:00.915 So, we can check out 478 00:33:00.915 --> 00:33:02.215 that it is well shown like this 479 00:33:02.215 --> 00:33:03.565 So we can now specify the destination 480 00:33:03.565 --> 00:33:07.615 and movement location like this 481 00:33:10.715 --> 00:33:14.715 Then, finally, you have to move 482 00:33:14.715 --> 00:33:18.065 When should we move? 483 00:33:18.065 --> 00:33:20.165 When we are drawing line and aiming 484 00:33:20.165 --> 00:33:21.115 we should not move 485 00:33:21.115 --> 00:33:26.065 I'm going to aim so I have a clear idea of ​​where I want to go 486 00:33:26.065 --> 00:33:28.615 and then have it move when I release my hand 487 00:33:28.615 --> 00:33:30.615 from the Thumbstick 488 00:33:31.715 --> 00:33:36.765 So, when we move, we can set my location 489 00:33:36.765 --> 00:33:44.265 Set Actor Location 490 00:33:44.265 --> 00:33:45.815 Where? 491 00:33:48.015 --> 00:33:52.465 The place where we set Destination 492 00:33:53.965 --> 00:33:55.765 You can move here 493 00:33:55.765 --> 00:33:58.515 What happens when you just move? 494 00:33:58.515 --> 00:34:01.079 We will get buried under the ground 495 00:34:01.079 --> 00:34:05.729 Actually, when Destination is on the ground 496 00:34:05.729 --> 00:34:09.079 We aim the ground's end point 497 00:34:09.079 --> 00:34:12.265 and ground's hit point 498 00:34:12.265 --> 00:34:13.965 and saved as destination 499 00:34:13.965 --> 00:34:17.365 We should be slightly higher than that 500 00:34:17.365 --> 00:34:19.665 So, as much as the capsule's height 501 00:34:23.515 --> 00:34:29.315 Let's raise about 50 502 00:34:29.315 --> 00:34:33.915 By +Add, we will raise 503 00:34:33.915 --> 00:34:38.765 about 50cm to Z axis 504 00:34:40.165 --> 00:34:44.965 So, we will convey the value to New Location 505 00:34:47.265 --> 00:34:49.565 Compile, save 506 00:34:54.465 --> 00:34:58.065 Teleport, move PLAY 507 00:34:58.465 --> 00:35:00.215 Then, aim here like this 508 00:35:00.215 --> 00:35:04.965 move in front of the desk and when you look back 509 00:35:04.965 --> 00:35:07.965 you can see the table at the back 510 00:35:07.965 --> 00:35:10.215 To move to the side of the table 511 00:35:10.215 --> 00:35:13.415 After aiming like this and move 512 00:35:13.415 --> 00:35:14.865 table is now on the right 513 00:35:14.865 --> 00:35:16.965 like this 514 00:35:16.965 --> 00:35:19.415 515 00:35:19.415 --> 00:35:22.015 We implemented the movement function 516 00:35:22.765 --> 00:35:27.765 Since it's complicated, I'll organize the nodes 517 00:35:27.765 --> 00:35:30.665 So add a function here 518 00:35:30.665 --> 00:35:37.015 And make a functin 519 00:35:37.015 --> 00:35:38.765 named Draw Teleport Line 520 00:35:38.765 --> 00:35:41.565 And at Draw Teleport Line function 521 00:35:41.565 --> 00:35:43.865 You know the nodes that were 522 00:35:45.615 --> 00:35:48.664 connected at Triggered function at Event Graph 523 00:35:48.664 --> 00:35:56.814 I will cut all of them by Ctrl+X 524 00:35:56.814 --> 00:35:58.964 and paste it at 525 00:35:58.964 --> 00:36:01.114 Draw Teleport Line 526 00:36:03.564 --> 00:36:06.614 Then, I'll connect the execution pin here like this 527 00:36:08.914 --> 00:36:11.564 Then go to Event Graph 528 00:36:11.564 --> 00:36:15.664 bring Draw Teleport Line function 529 00:36:15.664 --> 00:36:17.964 and connect to Triggered 530 00:36:17.964 --> 00:36:19.614 It's more clean, right? 531 00:36:21.164 --> 00:36:23.564 Add one more function 532 00:36:23.564 --> 00:36:28.714 and name it Teleport Action this time 533 00:36:28.714 --> 00:36:32.764 Make Teleport Action function 534 00:36:32.764 --> 00:36:36.514 and cut all the nodes that were stuck at 535 00:36:36.514 --> 00:36:39.914 Completed in Event Graph 536 00:36:39.914 --> 00:36:44.164 and paste it at Teleport Action 537 00:36:44.164 --> 00:36:47.014 Then, here, connect the execution pin 538 00:36:50.164 --> 00:36:51.464 At Event Graph 539 00:36:51.464 --> 00:36:54.364 bring Teleport Action function 540 00:36:54.364 --> 00:36:56.959 and connect at Completed 541 00:36:56.959 --> 00:37:02.609 Then the functions will be more clear 542 00:37:07.464 --> 00:37:09.814 You always have to test if there's any problem 543 00:37:09.814 --> 00:37:11.414 when it's made with function 544 00:37:11.414 --> 00:37:13.714 Teleport movement PLAY organized by function 545 00:37:13.714 --> 00:37:18.764 It is well drawn, and if we let it go, it moves 546 00:37:21.814 --> 00:37:24.514 So we can find out that 547 00:37:24.514 --> 00:37:26.564 it is moved well like this 548 00:37:28.814 --> 00:37:32.814 So, when we are going to move 549 00:37:32.814 --> 00:37:34.560 whether we are going to do Teleport movement 550 00:37:34.560 --> 00:37:36.510 or Normal movement 551 00:37:36.510 --> 00:37:40.864 we have to think about under the circumstance 552 00:37:40.864 --> 00:37:42.664 If natural movement 553 00:37:42.664 --> 00:37:45.564 Even if it requires overcoming a little dizziness 554 00:37:45.564 --> 00:37:48.414 when the content needs natural movement 555 00:37:48.414 --> 00:37:51.564 You can use the basic movement 556 00:37:51.564 --> 00:37:53.564 normal movement 557 00:37:53.564 --> 00:37:57.764 Otherwise, I want to look around 558 00:37:57.764 --> 00:38:00.064 and move without dizziness is more important 559 00:38:00.064 --> 00:38:02.964 Movement is not main 560 00:38:02.964 --> 00:38:05.564 Like this, using Teleport Line 561 00:38:05.564 --> 00:38:07.114 to move to Teleport 562 00:38:07.114 --> 00:38:10.614 Configuring the contents like that will be much better 563 00:38:10.614 --> 00:38:14.564 So, there's no right answer 564 00:38:14.564 --> 00:38:18.214 Depending on the situation 565 00:38:18.214 --> 00:38:21.364 you can decide which one is better by actually experiencing and implementing 566 00:38:21.364 --> 00:38:24.164 moving it according to the content 567 00:38:24.164 --> 00:38:28.564 and adopt the movement method 568 00:38:28.564 --> 00:38:31.814 that you think is more suitable or comfortable 569 00:38:31.814 --> 00:38:34.814 I will wrap up the content we learned in this lecture 570 00:38:34.814 --> 00:38:38.914 First, by implementing and experiencing 571 00:38:38.914 --> 00:38:41.864 both normal and teleport movement methods 572 00:38:41.864 --> 00:38:45.164 we looked into ways to minimize the cognitive dissonance phenomenon 573 00:38:45.164 --> 00:38:50.114 caused by the discrepancy between visual information and balance organ information 574 00:38:50.114 --> 00:38:53.864 Second, the Predict Projectile Path function node 575 00:38:53.864 --> 00:38:57.214 used when drawing the Teleport Line is 576 00:38:57.214 --> 00:38:59.814 a node often used when simulating the movement 577 00:38:59.814 --> 00:39:02.014 process of an object 578 00:39:02.014 --> 00:39:05.814 to predict the actual physical movement path 579 00:39:05.814 --> 00:39:09.514 it even calculates the case of collision with other objects on the path 580 00:39:09.514 --> 00:39:13.063 Please be aware of that 581 00:39:13.063 --> 00:39:17.463 Lastly, when applying an effect using the Niagara Effect 582 00:39:17.463 --> 00:39:19.563 there may be cases where the settings 583 00:39:19.563 --> 00:39:22.063 need to be adjusted in real time to suit the current situation 584 00:39:22.063 --> 00:39:24.763 Please remember that 585 00:39:24.763 --> 00:39:26.613 you can easily change data 586 00:39:26.613 --> 00:39:30.813 using User Parameters in the Niagara system 587 00:39:30.813 --> 00:39:31.413 Draw a moving prediction line Add Input Action and Bind Button 588 00:39:31.413 --> 00:39:32.013 Start by creating a new Input Action by selecting +Add - Input - Input Action in the Inputs folder of the Content Drawer 589 00:39:32.013 --> 00:39:32.563 Double-click the IMC_HunetInputMappings file to open the settings window and assign the IA_ThumbstickAxis_Right file to the Mappings array 590 00:39:32.563 --> 00:39:33.163 The button to connect is the Thumbstick 2D-Axis button on the VR controller (R) 591 00:39:33.163 --> 00:39:33.713 Basic movement implementation: Verify that when you tilt the right thumbstick while playing, the character moves forward, bakcward, left, and right 592 00:39:33.713 --> 00:39:34.313 It has been observed that wearing VR equipment and performing basic movements frequently can cause dizziness (cognitive dissonance phenomenon) 593 00:39:34.313 --> 00:39:34.813 Drawing the projectile prediction line Delete all existing Noraml Move nodes 594 00:39:34.813 --> 00:39:35.313 Create the node Predict Projectile Path by TraceChannel for calculating the projectile’s trajectory, then connect it to the Triggered event execution pin 595 00:39:35.313 --> 00:39:35.913 Set the start position (Start Pos) of the prediction to the position of the Right Motion Controller 596 00:39:35.913 --> 00:39:36.513 and set the launch velocity to the forward direction of the motion controller multiplied by 650 597 00:39:36.513 --> 00:39:37.113 Set the channel to be detected to the Visibility Channel and exclude the actor itself (Self) from the detection target 598 00:39:37.113 --> 00:39:37.663 For verification purposes, set the Draw Debug Type to For One Frame 599 00:39:37.663 --> 00:39:38.263 Verify that when you move the right thumbstick while playing, a sphere is drawn along the predicted trajectory line 600 00:39:38.263 --> 00:39:38.763 Displaying Niagara Effect: Draw Projectile Prediction Line Start by selecting +Add - Niagara particle system component in the components panel of 601 00:39:38.763 --> 00:39:39.263 BP_HunetVRPlayer settings window to add the Niagara Component 602 00:39:39.263 --> 00:39:39.763 Verify that when playing and manipulating the right thumbstick, lines are drawn using the Niagara Effect 603 00:39:39.763 --> 00:39:40.263 Lines are drawn accurately, but the arrival point isn’t clearly indicated, suggesting the need for an additional effect 604 00:39:40.263 --> 00:39:40.763 Displaying ring effect at the target point: Begin by adding a Niagara Particle System Component to be used at the movement destination point 605 00:39:40.763 --> 00:39:41.263 Verify that the ring effect appears at the end of the line during play Verify the issue where effect doesn’t disappear when releasing the button 606 00:39:41.263 --> 00:39:41.763 Turn off the teleport line and ring effect: Implement the logic so that when releasing the right thumbstick, the line and effect disappear 607 00:39:41.763 --> 00:39:42.263 After connecting the nodes, verify that tilting the right thumbstick draws the line, and releasing the thumbstick erases the line 608 00:39:42.263 --> 00:39:42.763 Implementing teleport functionality: Move to the destination when teleporting Use the Destination Location variable 609 00:39:42.763 --> 00:39:43.263 saved when drawing the teleport line as the New Location input for Set Actor Location on the new actor 610 00:39:43.263 --> 00:39:43.763 To prevent the player pawn from moving to the ground where the teleport ring is drawn 611 00:39:43.763 --> 00:39:44.263 Set the teleport destination by adding 50 units to the Z-axis of the Destination Location variable to ensure the position is above ground level 612 00:39:44.263 --> 00:39:44.763 After playing again, move the right thumbstick to select the teleport destination, and when releasing the thumbstick, verify that the player moves to that location accordingly 613 00:39:44.763 --> 00:39:45.263 Organize the Blueprint nodes: Connect the Triggered execution pin of the IA_ThumbstickAxis_Right node to the Draw Teleport Line function node 614 00:39:45.263 --> 00:39:45.763 and connect the Completed execution pin to the Teleport Action function node