All language subtitles for lesson133

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian Download
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:06,656 --> 00:00:12,800 Another really cool effect 2 00:00:13,056 --> 00:00:14,592 In due in addition to particles 3 00:00:15,104 --> 00:00:17,920 Is we can actually sort of knockback the player 4 00:00:18,176 --> 00:00:19,200 If he gets hurt 5 00:00:19,968 --> 00:00:22,272 So the way that we would actually achieve this 6 00:00:22,528 --> 00:00:24,064 Is simply Be 7 00:00:24,320 --> 00:00:25,088 Testing 8 00:00:25,856 --> 00:00:28,160 Which side do players getting hit from 9 00:00:28,416 --> 00:00:31,232 So if the player is getting hit from the right side 10 00:00:31,488 --> 00:00:34,048 Not the player to the left right 11 00:00:34,816 --> 00:00:37,376 And if you get hit from the left side from an enemy 12 00:00:37,632 --> 00:00:39,424 Not him to the right like that 13 00:00:40,704 --> 00:00:42,240 So how do we achieve this 14 00:00:42,752 --> 00:00:48,128 Well we actually go inside of the attack box remember the attack box is a child of an enemy 15 00:00:48,640 --> 00:00:49,152 Ok 16 00:00:49,664 --> 00:00:50,432 Your call 17 00:00:50,944 --> 00:00:52,224 I select this enemy here 18 00:00:52,992 --> 00:00:55,552 The enemy has an attack box that's a child 19 00:00:56,064 --> 00:00:58,112 It has an attack box script on here 20 00:00:58,368 --> 00:01:00,781 What inside of a script we can actually write a simple 21 00:01:00,783 --> 00:01:03,131 Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1 22 00:01:03,132 --> 00:01:02,464 Condition 23 00:01:02,720 --> 00:01:05,024 That will test which side of the player 24 00:01:05,280 --> 00:01:06,048 We're on 25 00:01:06,816 --> 00:01:07,840 I'm going to test that 26 00:01:08,096 --> 00:01:09,888 Inside of the on trigger event 27 00:01:10,144 --> 00:01:10,656 Ok 28 00:01:10,912 --> 00:01:14,496 Once we get that information whether it's on the left or the right side of the player 29 00:01:14,752 --> 00:01:17,056 We can launch the player in that direction 30 00:01:18,592 --> 00:01:19,104 So 31 00:01:19,616 --> 00:01:22,432 Let's go ahead and jump inside of the attack box script 32 00:01:22,688 --> 00:01:25,760 How exactly are we going to figure out what side the player 33 00:01:26,016 --> 00:01:27,296 Is being hit from 34 00:01:27,552 --> 00:01:29,344 When Hitler visit at box 35 00:01:30,112 --> 00:01:31,648 Well we're going to create a new variable 36 00:01:33,184 --> 00:01:34,208 In a variable 37 00:01:35,488 --> 00:01:37,024 Give me a serialised field 38 00:01:37,792 --> 00:01:38,816 Tell your private 39 00:01:39,072 --> 00:01:41,376 Integer is going to be cold target 40 00:01:42,400 --> 00:01:42,912 Side 41 00:01:43,936 --> 00:01:48,032 The weather in 4 words we could use here but your side makes the most sense to me 42 00:01:48,288 --> 00:01:54,432 And this value was either be -1 or 1 - 1 left side in a positive 43 00:01:54,688 --> 00:01:56,736 Dean the right side ok 44 00:01:57,760 --> 00:01:59,808 And we can basically test 45 00:02:00,320 --> 00:02:01,344 Which side 46 00:02:02,112 --> 00:02:06,976 This attack boxes on inside of the ontriggerenter2d function 47 00:02:07,744 --> 00:02:11,072 So what's a pseudocode to get an idea what this will be 48 00:02:11,584 --> 00:02:12,864 If 49 00:02:13,376 --> 00:02:14,400 I'm on 50 00:02:15,424 --> 00:02:17,216 Pallidus if I'm 51 00:02:17,472 --> 00:02:19,520 Add an exposition 52 00:02:20,288 --> 00:02:21,824 That is smaller 53 00:02:22,080 --> 00:02:23,872 Then what I'm attacking 54 00:02:24,128 --> 00:02:27,712 Anasta col de collider2d right here 55 00:02:28,992 --> 00:02:32,064 If I'm in a position that's smaller than that 56 00:02:32,832 --> 00:02:33,600 Then I'm 57 00:02:33,856 --> 00:02:36,416 On the left side and that's -1 58 00:02:38,208 --> 00:02:41,024 Otherwise you lying here 59 00:02:42,560 --> 00:02:45,632 Otherwise I'm on the right side 60 00:02:46,400 --> 00:02:46,912 1 61 00:02:47,168 --> 00:02:52,544 Alright then might sound a little bit complicated so just hold on here it's not actually that bad 62 00:02:53,568 --> 00:02:56,128 I'm actually going to write a very simple condition here 63 00:02:56,640 --> 00:02:59,968 That's going to translate the pseudocode into actual code 64 00:03:00,992 --> 00:03:05,344 Now a lot of you who are a little bit more advanced than me in code 65 00:03:05,600 --> 00:03:11,744 You might know of a very much more complicated yes simpler solution and it sounds like 66 00:03:12,000 --> 00:03:15,328 But what I mean is there are plenty of ways to write code 67 00:03:15,584 --> 00:03:21,728 Especially when using if statements that can be a lot simpler but it actually requires a little bit more 68 00:03:21,984 --> 00:03:26,336 Complex understanding of just going to write the very simple version of this code 69 00:03:26,848 --> 00:03:27,616 It's 70 00:03:27,872 --> 00:03:28,384 If 71 00:03:29,408 --> 00:03:35,552 My parent member the attackbox is actually a child of the enemy so if transfer 72 00:03:35,808 --> 00:03:37,600 Transform 73 00:03:37,856 --> 00:03:39,648 That position that x 74 00:03:40,416 --> 00:03:41,440 If that position 75 00:03:41,952 --> 00:03:42,976 Nex 76 00:03:43,488 --> 00:03:45,024 Is smaller than 77 00:03:45,280 --> 00:03:49,120 The collider2d that transformed opposition that x 78 00:03:49,888 --> 00:03:50,656 Well then 79 00:03:51,168 --> 00:03:53,216 I'm on the left side so what does that mean 80 00:03:53,472 --> 00:03:55,520 Target side equals -1 81 00:03:57,056 --> 00:03:58,080 Otherwise 82 00:03:58,592 --> 00:03:59,616 My target side 83 00:04:00,128 --> 00:04:02,432 Is positive one ok 84 00:04:02,944 --> 00:04:08,576 So the reason why we see realised this is so that we can actually see it player in the editor so it's go ahead and tested 85 00:04:08,832 --> 00:04:11,392 South square head in select this enemy here 86 00:04:11,904 --> 00:04:13,952 In brexit I want to see 87 00:04:15,744 --> 00:04:18,559 What the target site is for this attack box 88 00:04:18,815 --> 00:04:19,839 When we play 89 00:04:20,095 --> 00:04:22,143 Remember the attack box is a child 90 00:04:22,399 --> 00:04:25,471 So that's why in r script using transform 91 00:04:25,727 --> 00:04:26,751 The parrot here 92 00:04:28,031 --> 00:04:29,055 Protesting 93 00:04:29,823 --> 00:04:31,359 From the attack box 94 00:04:31,871 --> 00:04:33,407 Testing to see 95 00:04:33,663 --> 00:04:35,455 Where are the enemy in this the pain 96 00:04:35,711 --> 00:04:36,991 Where is position is 97 00:04:37,247 --> 00:04:38,783 Relative to the player 98 00:04:39,551 --> 00:04:40,575 40 plate year 99 00:04:44,159 --> 00:04:44,671 Ok 100 00:04:44,927 --> 00:04:47,487 Securly is like the attackbox year 101 00:04:47,743 --> 00:04:49,535 It said to target side of one 102 00:04:49,791 --> 00:04:53,887 What happens when it hits the player on the right side it's going to stay at 1 right 103 00:04:54,399 --> 00:04:55,935 Where was when I hit the left side 104 00:04:57,471 --> 00:04:59,263 -1 c that 105 00:04:59,775 --> 00:05:00,799 No it's -1 106 00:05:01,311 --> 00:05:03,359 How many goes back to positive one 107 00:05:04,127 --> 00:05:05,151 It's a player hits 108 00:05:06,175 --> 00:05:07,199 On the right side 109 00:05:08,223 --> 00:05:12,831 So what does that mean now we have the right information we need to send the player 110 00:05:13,087 --> 00:05:14,367 In a certain Direction 111 00:05:14,879 --> 00:05:17,183 And knock him back when he gets hurt 112 00:05:18,463 --> 00:05:22,815 So they were going to do that is actually just go to a new player here and if you recall 113 00:05:23,327 --> 00:05:24,863 Inside of a new player script 114 00:05:25,375 --> 00:05:28,703 All that functionally happens in the heart function here 115 00:05:29,215 --> 00:05:33,823 No currently we're only passing through an integer and that's attack power 116 00:05:34,079 --> 00:05:36,127 So get up we're going to the attackbox here 117 00:05:38,687 --> 00:05:40,735 This is the actual code that handles 118 00:05:41,247 --> 00:05:42,783 Power hitting the player 119 00:05:43,551 --> 00:05:44,831 As you can see here 120 00:05:45,599 --> 00:05:48,671 When we hurt the player were sending in the attack power 121 00:05:49,183 --> 00:05:50,719 Relative to this enemy 122 00:05:50,975 --> 00:05:52,767 But we can also send through 123 00:05:55,839 --> 00:05:57,375 The target side right 124 00:05:58,143 --> 00:05:59,423 As you can see 125 00:05:59,679 --> 00:06:04,287 We're getting there and that's because currently we do not have two parameters available to us 126 00:06:04,799 --> 00:06:06,591 In the player hurt function 127 00:06:07,359 --> 00:06:09,663 Got a new player here in adorama 128 00:06:10,687 --> 00:06:11,711 An integer 129 00:06:11,967 --> 00:06:13,759 Going to call it target side 130 00:06:16,063 --> 00:06:19,647 So now that's going to debug in test this out debug.log 131 00:06:20,159 --> 00:06:21,695 I'm getting hurt 132 00:06:22,463 --> 00:06:25,279 On my side colon 133 00:06:26,047 --> 00:06:27,071 And then 134 00:06:27,839 --> 00:06:30,655 What eyesight is so just tested on 135 00:06:32,191 --> 00:06:33,983 Go ahead play here 136 00:06:36,031 --> 00:06:41,407 So if we get hurt hopefully in the console window is going to tell us which side we're going her on 137 00:06:42,431 --> 00:06:44,223 Ok I'm getting her on my 138 00:06:44,479 --> 00:06:45,247 Side 139 00:06:45,759 --> 00:06:47,295 Whining at the right side 140 00:06:47,807 --> 00:06:49,599 And then if you get hit in the left side 141 00:06:50,111 --> 00:06:52,671 I'm getting hit on my side -1 142 00:06:52,927 --> 00:06:53,951 Turn the left side 143 00:06:54,207 --> 00:06:55,487 Information is being 144 00:06:55,743 --> 00:06:57,023 Sent through 145 00:06:58,559 --> 00:07:00,351 Desert function inside the player 146 00:07:00,607 --> 00:07:03,935 So now the player knows which side he's getting her on 147 00:07:04,703 --> 00:07:07,775 Or we can send the player in the direction ok 148 00:07:08,799 --> 00:07:14,943 The way we're going to send the player in a certain Direction is really gonna create a new very 149 00:07:15,199 --> 00:07:18,271 In a variable is going to be called Lodge 150 00:07:18,783 --> 00:07:24,927 Essentially we're getting out of a cannon to some degree or shooting the player from his current position 151 00:07:25,183 --> 00:07:26,719 Watching him 152 00:07:26,975 --> 00:07:31,839 In the opposite direction that is getting hurt ok so we're going to create a new variable 153 00:07:32,607 --> 00:07:35,935 And we go ahead and just put inside of the attributes here 154 00:07:36,703 --> 00:07:39,775 And it's not going to serialise it's give you a private 155 00:07:40,031 --> 00:07:42,079 Float on record March 156 00:07:42,847 --> 00:07:44,383 My default is 0 157 00:07:45,151 --> 00:07:47,711 Now we can put that value 158 00:07:48,735 --> 00:07:51,039 Inside of a target velocity 159 00:07:52,319 --> 00:07:53,087 Lying here 160 00:07:53,343 --> 00:07:58,463 Remember the target velocity currently all this happening is the X value 161 00:07:58,975 --> 00:08:01,535 Of our target velocity is determined 162 00:08:02,047 --> 00:08:06,911 By the horizontal axis so when I'm pressing left or right key when I'm running 163 00:08:07,423 --> 00:08:09,215 X r max speed value 164 00:08:09,471 --> 00:08:11,263 Or we can also add 165 00:08:11,519 --> 00:08:13,823 The launch value ok 166 00:08:14,591 --> 00:08:20,223 And that means that if our launch is -1 the player is going to constantly move to the left 167 00:08:20,991 --> 00:08:22,527 Or if the player gets hurt 168 00:08:22,783 --> 00:08:28,927 On the other side he's can't so I'm going to move to the right ok so that's actually said the launch value 169 00:08:29,183 --> 00:08:30,975 Turn the lounge values set to zero so 170 00:08:31,231 --> 00:08:32,511 This is going to do anything 171 00:08:33,023 --> 00:08:35,071 But if I scroll down in my heart function 172 00:08:35,839 --> 00:08:36,863 And I say 173 00:08:37,631 --> 00:08:39,423 Launch equals 174 00:08:40,447 --> 00:08:41,727 Target side 175 00:08:42,751 --> 00:08:44,287 It's going to move in that direction 176 00:08:44,543 --> 00:08:50,687 How to be clear we want to make sure it's the negative target side because I get hit on my right side in 177 00:08:50,943 --> 00:08:51,455 Is wine 178 00:08:51,711 --> 00:08:56,063 I don't want the player to move to the right I want to play the move in the opposite direction 179 00:08:56,319 --> 00:08:57,087 So negative 180 00:08:57,599 --> 00:08:59,647 So if we said this 181 00:09:01,183 --> 00:09:05,791 What should happen is the player should constantly move to the left or to the right 182 00:09:06,047 --> 00:09:06,815 When 183 00:09:07,327 --> 00:09:08,351 The player gets hurt 184 00:09:09,119 --> 00:09:11,167 So test that functionality first 185 00:09:13,727 --> 00:09:14,751 Premier player 186 00:09:15,007 --> 00:09:19,359 Alright so I round to my enemies here I should constantly move their left 187 00:09:19,615 --> 00:09:20,127 There we go 188 00:09:20,639 --> 00:09:26,783 Just barely left and you can see this still happening here and that's because the large is currently searching 189 00:09:27,039 --> 00:09:27,807 What ok 190 00:09:28,063 --> 00:09:31,647 So that kind of works right 191 00:09:32,159 --> 00:09:33,439 But there's one problem 192 00:09:34,207 --> 00:09:35,999 And that is that the launch 193 00:09:36,255 --> 00:09:37,023 Is 194 00:09:37,535 --> 00:09:39,327 Remaining at that value 195 00:09:39,583 --> 00:09:45,727 Set the mama we get hit it stays play It's -1 forever or one forever 196 00:09:45,983 --> 00:09:49,055 The players always going to be moving and add some 197 00:09:49,311 --> 00:09:52,383 Air resistance or friction to this value 198 00:09:52,895 --> 00:09:58,527 This is actually one of my favourite lines of code to write and have been reading this code since I was 199 00:09:59,039 --> 00:10:02,764 And I'm 16 years old and this is a code I don't know where I came up with it or how aware 200 00:10:02,765 --> 00:10:04,434 Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1 201 00:10:05,439 --> 00:10:06,207 I read it but 202 00:10:06,463 --> 00:10:12,351 I use this code to smoothly was called lerp a value back to 0 203 00:10:12,863 --> 00:10:14,655 So we can go from one 204 00:10:15,423 --> 00:10:19,007 20 with this line of code so the pseudocode is 205 00:10:19,263 --> 00:10:20,287 Burp or 206 00:10:20,543 --> 00:10:21,311 Ease 207 00:10:23,359 --> 00:10:28,223 The large value back to zero at all times 208 00:10:28,991 --> 00:10:31,807 So we set the March to 1 209 00:10:32,319 --> 00:10:38,207 When the player gets hurt it's going to smoothly go back to zero so that he only moves a little bit 210 00:10:39,743 --> 00:10:45,887 So this will look confusing I promise you was going to look confusing and all I ask is that you trust me don't get 211 00:10:46,143 --> 00:10:52,287 Next year and just I just try and memorise the way that we write this because I love writing this line of code 212 00:10:52,543 --> 00:10:57,407 So what does Lana coders again it takes the large value back to 0 213 00:10:57,919 --> 00:11:02,271 To the way we write that is we take a flow like lunch and we write plus equals 214 00:11:02,783 --> 00:11:05,855 The value we want to go to zero 215 00:11:06,111 --> 00:11:09,695 Miners are current value Lodge 216 00:11:09,951 --> 00:11:15,327 We x x x at delta time because we're iterating right we don't want the 217 00:11:15,839 --> 00:11:20,447 The movement in a learning to be depending on the frame rate of a computer 218 00:11:21,215 --> 00:11:25,823 So we x x x out a time and then we're going to multiply that time so kind 219 00:11:26,079 --> 00:11:27,871 Large recovery value 220 00:11:28,127 --> 00:11:31,455 Just bear with me a minute right launch recovery 221 00:11:31,967 --> 00:11:35,551 Well that float doesn't exist so it's Craig don't really 222 00:11:35,807 --> 00:11:38,111 I know this is confusing just bear with me here 223 00:11:39,647 --> 00:11:41,183 Launch recovery 224 00:11:41,439 --> 00:11:44,511 Is it going to be a serialised field for the week and week in the editor 225 00:11:46,047 --> 00:11:48,607 Alright so what the heck 226 00:11:48,863 --> 00:11:50,911 Did we just write 227 00:11:51,423 --> 00:11:51,935 Well 228 00:11:52,191 --> 00:11:53,727 We want to launch value 229 00:11:54,495 --> 00:11:56,287 To ease back 20 230 00:11:56,799 --> 00:11:58,847 All the time so I get hit 231 00:11:59,103 --> 00:12:03,199 If it goes if I get hit then moved to the right at a large value of 1 232 00:12:03,455 --> 00:12:07,295 I want to cancel this right I wanted to go back to zero 233 00:12:07,807 --> 00:12:10,623 So that is what this function here is 234 00:12:10,879 --> 00:12:13,695 Just ignore this for now but we're x 235 00:12:13,951 --> 00:12:15,999 And just think about this value here 236 00:12:17,023 --> 00:12:19,327 Launch is iterating 237 00:12:20,351 --> 00:12:21,631 Increasing 238 00:12:22,143 --> 00:12:22,655 Bye 239 00:12:22,911 --> 00:12:23,935 0 240 00:12:24,191 --> 00:12:28,287 - the current large power right so if it's 1 241 00:12:29,055 --> 00:12:32,383 Is going to increase by a very quick value 242 00:12:32,895 --> 00:12:33,663 Analysis 243 00:12:34,175 --> 00:12:36,735 Wine -1 so it's going to 244 00:12:36,991 --> 00:12:38,015 Decrease 245 00:12:39,039 --> 00:12:41,343 Amen because we just did that 246 00:12:41,599 --> 00:12:43,135 The launch by is little bit smaller 247 00:12:43,903 --> 00:12:50,047 And on every iteration the launch by get smaller and smaller smaller smaller smaller smaller smaller and he is 248 00:12:50,303 --> 00:12:50,815 0 249 00:12:51,071 --> 00:12:54,399 I don't require you to fully understand this 250 00:12:55,167 --> 00:12:58,751 Just know that if you want something to learn smoothly back to 0 251 00:12:59,007 --> 00:13:00,543 This is a great way 252 00:13:01,055 --> 00:13:02,847 To write that out again 253 00:13:03,615 --> 00:13:06,943 Your float value iterated so plus equals 254 00:13:07,967 --> 00:13:13,087 And you do apprentices in on the left side of the princesses you do where you want to go 255 00:13:13,599 --> 00:13:15,903 And then you subtract by your current value 256 00:13:16,159 --> 00:13:17,951 Then you just multiply 257 00:13:18,719 --> 00:13:22,303 Buy timedelta time you always do that when you're eating a value 258 00:13:22,815 --> 00:13:28,191 And then you x x some kind of friction value or a recovery via Sunday night 259 00:13:28,447 --> 00:13:32,543 Was slow it down or speed it up depending on the value strength ok 260 00:13:32,799 --> 00:13:35,103 Again I know this is confusing 261 00:13:35,615 --> 00:13:37,151 So let's just has to sell 262 00:13:37,407 --> 00:13:38,431 And see what happens 263 00:13:38,687 --> 00:13:44,831 What's going on inside your player here and just make sure that our values are showing up as you can see the value of launch recovery is curry 264 00:13:45,087 --> 00:13:45,599 0 265 00:13:45,855 --> 00:13:47,391 What set it to 266 00:13:48,415 --> 00:13:49,951 Wine and see what happens 267 00:13:50,207 --> 00:13:51,487 Player gets hit 268 00:13:57,119 --> 00:14:00,447 Alright so you can barely see it's really hard to tell 269 00:14:00,959 --> 00:14:02,751 Let's go ahead in change 270 00:14:03,007 --> 00:14:06,079 My value give me something a little bit bigger 271 00:14:06,335 --> 00:14:10,431 Because currently he's just not moving that much so it's really hard to tell what's going on 272 00:14:10,687 --> 00:14:12,223 Touching back in your script here 273 00:14:12,479 --> 00:14:16,319 And let's go ahead in make this launch value 274 00:14:17,087 --> 00:14:23,231 Bigger than -1 or positive 1 curly it's going to be as big as the target side which is 275 00:14:23,487 --> 00:14:25,535 Value of 1 x x 276 00:14:26,047 --> 00:14:26,815 Times of value 277 00:14:27,071 --> 00:14:28,863 We can multiply x 10 278 00:14:29,119 --> 00:14:32,447 25 something like that or we could play a lot 279 00:14:32,703 --> 00:14:33,215 Power 280 00:14:33,727 --> 00:14:34,495 No you 281 00:14:35,007 --> 00:14:39,615 How to make a new vector to so that we can have a power in the Y Direction 282 00:14:39,871 --> 00:14:44,223 In the extraction and right now we're only going to worry about the launch Power that x 283 00:14:44,991 --> 00:14:48,319 That doesn't exist right so just roll up 284 00:14:49,087 --> 00:14:50,367 And what will you do 285 00:14:50,623 --> 00:14:53,183 Is just credit voucher serializefield 286 00:14:53,951 --> 00:14:58,815 Can I be a private vector to Ennis going to be called Lodge power 287 00:14:59,071 --> 00:14:59,583 Ok 288 00:15:02,143 --> 00:15:04,703 Ok so if you go back in the unity could a player here 289 00:15:05,215 --> 00:15:09,567 You can see you can see that our launch Power is currently set to 0 290 00:15:10,079 --> 00:15:14,687 In the extraction in why worry about the Y Direction right now 291 00:15:15,199 --> 00:15:19,551 But currently let's just worry about the extraction so let's make it a value of 292 00:15:19,807 --> 00:15:20,575 Annabelle 293 00:15:21,087 --> 00:15:22,367 10 ok 294 00:15:22,879 --> 00:15:26,975 So now we have a large power of ten to the players going to fly pretty far 295 00:15:27,487 --> 00:15:30,047 And because that launch value 296 00:15:30,559 --> 00:15:34,911 Is going to iterate back to 0 with a large recovery value of 1 297 00:15:35,423 --> 00:15:40,543 It slowly smoothly go back to zero in the players should stop watching 298 00:15:40,799 --> 00:15:41,823 Test this out 299 00:15:47,711 --> 00:15:48,479 Here we go 300 00:15:49,503 --> 00:15:51,295 Very slowly sending it back 301 00:15:51,807 --> 00:15:52,575 Turning the player 302 00:15:53,599 --> 00:15:56,671 In a direction and then slowly sliding so watch 303 00:15:57,695 --> 00:15:58,463 Derry girls 304 00:15:59,743 --> 00:16:01,279 Very sadly right 305 00:16:02,047 --> 00:16:07,167 Set alarm for carvery with makers Valley a little bit bigger hear something like five so that he doesn't 306 00:16:07,423 --> 00:16:09,727 Take so long to stop sliding 307 00:16:10,751 --> 00:16:11,775 There we go 308 00:16:13,823 --> 00:16:16,895 OK get so he's getting it push just a little bit 309 00:16:17,663 --> 00:16:18,175 Alright 310 00:16:18,943 --> 00:16:23,551 Looks a little weird because we're not actually moving the player in the Y Direction just yeah 311 00:16:23,807 --> 00:16:29,951 So let's set the large power something like 15 so now that large recovery values 312 00:16:30,207 --> 00:16:30,975 Tyre 313 00:16:31,231 --> 00:16:33,023 Push the player a little bit harder 314 00:16:33,535 --> 00:16:35,071 There we go that looks great 315 00:16:36,095 --> 00:16:40,447 Remember when we exit play mode we're gonna lose these values here so what's memoriser 316 00:16:40,703 --> 00:16:44,031 Large recovery is 5 in large power is 15 317 00:16:45,055 --> 00:16:45,567 Ireland 318 00:16:46,079 --> 00:16:47,615 Plugged in 319 00:16:48,127 --> 00:16:49,151 Light recovery 320 00:16:49,407 --> 00:16:51,199 5 large power of 15 321 00:16:51,455 --> 00:16:53,759 And now all we need to worry about now guys 322 00:16:54,271 --> 00:16:56,831 Is lodging the player in the Y Direction 323 00:16:57,599 --> 00:17:01,951 By a certain value in this case it's going to be the launch Power Wye Valley 324 00:17:02,463 --> 00:17:08,607 Now fortunately going in the Y Direction is a lot simpler here so what we going to do is just go back to the original Star 325 00:17:08,863 --> 00:17:10,655 In the new player script 326 00:17:11,679 --> 00:17:12,703 And I'm going to do 327 00:17:12,959 --> 00:17:14,239 Is I'm just going to set 328 00:17:14,751 --> 00:17:16,031 Velocity 329 00:17:17,567 --> 00:17:21,407 Why I'm going to said that to the launch Power 330 00:17:22,943 --> 00:17:23,967 That way 331 00:17:24,479 --> 00:17:29,599 So what I was going to push the player up into the Year right there's nothing really 332 00:17:30,111 --> 00:17:34,207 Regarding the velocity in the y-direction there's nothing related to the target side 333 00:17:34,463 --> 00:17:37,279 So what does always going to knock the player into the air 334 00:17:37,535 --> 00:17:41,631 So that's why this is so simple the last few that y = large power 335 00:17:41,887 --> 00:17:42,655 Don't worry 336 00:17:43,167 --> 00:17:44,447 And that should do it 337 00:17:44,703 --> 00:17:45,983 What's tested out 338 00:17:46,239 --> 00:17:47,263 Alright here we go 339 00:17:50,079 --> 00:17:53,151 So curly the Y value is set to 0 here 340 00:17:53,407 --> 00:17:54,943 I said this to you 5 341 00:17:55,199 --> 00:17:55,967 2 happens 342 00:18:00,319 --> 00:18:01,087 Ok good 343 00:18:03,903 --> 00:18:05,439 Send it to you 15 344 00:18:08,767 --> 00:18:09,791 Pre big bang 345 00:18:13,375 --> 00:18:16,191 It's another bad intense maybe 10 346 00:18:17,727 --> 00:18:18,751 Ok 347 00:18:21,567 --> 00:18:27,711 Alright looks great so I think that that is fine for now there is an episode 348 00:18:27,967 --> 00:18:28,991 Tutorial which is going to be 349 00:18:29,247 --> 00:18:34,623 Just cleaning up a lot of a game feel just cleaning up the player movement and how things feel 350 00:18:35,135 --> 00:18:37,183 But in terms of functionality 351 00:18:37,439 --> 00:18:38,719 I mean this is great 352 00:18:38,975 --> 00:18:41,791 Again make sure you memorise the value so it's 5 353 00:18:42,047 --> 00:18:43,327 15 and 10 354 00:18:43,839 --> 00:18:46,911 How much can a plug goes in 515 in 355 00:18:47,167 --> 00:18:48,703 10 mm 26136

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.