All language subtitles for 05. Game Camera

af Afrikaans
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
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
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian Download
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,256 --> 00:00:02,560 We've got a basic player and we've got 2 00:00:02,816 --> 00:00:04,352 A basic 3 00:00:04,864 --> 00:00:08,704 So let's get some camera movement working so we can actually 4 00:00:08,960 --> 00:00:10,496 Traverse the 5 00:00:11,008 --> 00:00:13,312 And be able to see what's going on 6 00:00:13,824 --> 00:00:18,432 What I'm going to do is I'm going to create a new scene by going to see in new SIM 7 00:00:18,944 --> 00:00:23,296 And we're gonna start using hotkeys now that we've done this a few times through the UI 8 00:00:23,552 --> 00:00:26,368 So the hockey create new scenes is control 9 00:00:26,624 --> 00:00:28,672 And that will automatically bring 10 00:00:28,928 --> 00:00:29,952 To the new sim creation 11 00:00:30,208 --> 00:00:31,744 Can you can hit control a 12 00:00:32,000 --> 00:00:34,560 To bring up the add node dial 13 00:00:35,072 --> 00:00:37,632 So again that's control End to start a new scene 14 00:00:37,888 --> 00:00:39,168 And then control a 15 00:00:39,680 --> 00:00:41,728 To open up the ad no dialogue 16 00:00:41,984 --> 00:00:44,800 What I'm going to do is I'm going to search for camera too 17 00:00:45,056 --> 00:00:46,080 And I'm going to enter 18 00:00:46,592 --> 00:00:47,104 To add 19 00:00:47,616 --> 00:00:48,384 To my 20 00:00:48,896 --> 00:00:49,408 Scene 21 00:00:49,664 --> 00:00:51,456 I want to rename this to game camera 22 00:00:52,224 --> 00:00:58,368 And the recommended style for naming your nose by the way is Pascal case for 23 00:00:58,624 --> 00:00:59,904 Good names and 24 00:01:00,123 --> 00:01:02,363 Subtitled by online-courses.club We compress knowledge for you! 25 00:01:02,364 --> 00:01:01,184 Case for basic 26 00:01:01,440 --> 00:01:01,952 Everything else 27 00:01:02,208 --> 00:01:03,232 So we received 28 00:01:03,488 --> 00:01:04,256 What's inseam 29 00:01:04,768 --> 00:01:05,792 Create a new phone 30 00:01:06,304 --> 00:01:07,840 Game underscore camera 31 00:01:09,120 --> 00:01:10,144 And we're going to say that 32 00:01:10,400 --> 00:01:11,424 Game camera 33 00:01:12,960 --> 00:01:14,496 What's going on at a script 34 00:01:14,752 --> 00:01:18,336 And we're going to keep the same thing that we have last time so no 35 00:01:18,592 --> 00:01:19,872 Default for r temple 36 00:01:20,128 --> 00:01:20,640 And then 37 00:01:20,896 --> 00:01:21,664 The default 38 00:01:21,920 --> 00:01:22,688 Is fine 39 00:01:22,944 --> 00:01:23,712 So where can I go 40 00:01:23,968 --> 00:01:24,480 Create that 41 00:01:24,736 --> 00:01:25,760 So whatever you want to do it 42 00:01:26,016 --> 00:01:28,064 Well every frame we need to update 43 00:01:28,320 --> 00:01:29,088 The cameras 44 00:01:29,600 --> 00:01:33,184 But first we need to tell good girl to use the curry 45 00:01:33,440 --> 00:01:34,976 Camera so in Godot 46 00:01:35,232 --> 00:01:37,792 You can have multiple cameras in a scene 47 00:01:38,048 --> 00:01:39,584 In the camera that surrendered 48 00:01:39,840 --> 00:01:42,912 Is based on what camera is the current camera 49 00:01:43,424 --> 00:01:47,520 And so the way that were going to do that is there just going to in the ready method or reply 50 00:01:47,776 --> 00:01:48,544 Bus pass line 51 00:01:49,056 --> 00:01:49,568 Current 52 00:01:49,824 --> 00:01:50,848 I was going to go and save 53 00:01:51,360 --> 00:01:54,432 So when the camera is ready it will be made 54 00:01:54,688 --> 00:01:55,968 To me the current camera 55 00:01:56,224 --> 00:01:59,040 And then in process we want to follow the player now 56 00:01:59,296 --> 00:02:00,320 How do we know 57 00:02:00,832 --> 00:02:04,160 What the position of the player is within the game camera 58 00:02:04,672 --> 00:02:06,976 What we can do as we can use groups for that 59 00:02:07,232 --> 00:02:09,024 So I'm going to go back to my main 60 00:02:09,280 --> 00:02:10,816 I'm gonna click into 61 00:02:11,072 --> 00:02:12,096 Best player seen here 62 00:02:12,352 --> 00:02:13,888 Click open in editor 63 00:02:14,144 --> 00:02:15,168 The only thing that you can 64 00:02:15,424 --> 00:02:17,216 Is you can hit control she 65 00:02:17,472 --> 00:02:18,240 And then 66 00:02:18,752 --> 00:02:20,544 To bring open the quick 67 00:02:20,800 --> 00:02:23,872 Window and then you can search for your scene by name 68 00:02:24,128 --> 00:02:25,152 And double click it 69 00:02:25,664 --> 00:02:26,688 So your top players 70 00:02:27,200 --> 00:02:27,968 If I click on 71 00:02:28,224 --> 00:02:31,040 Root node and then go to the Note Tab 72 00:02:31,552 --> 00:02:32,064 The inspector 73 00:02:32,320 --> 00:02:35,136 Or wherever it is in your edit 74 00:02:35,648 --> 00:02:37,440 There's a groups button here which 75 00:02:37,696 --> 00:02:41,024 And now I can add the player to it 76 00:02:41,536 --> 00:02:43,328 Try and manage groups if I'm 77 00:02:43,584 --> 00:02:44,352 To do it this way 78 00:02:44,608 --> 00:02:46,912 And I can type in here into this box 79 00:02:47,168 --> 00:02:47,680 Player 80 00:02:48,192 --> 00:02:48,704 And click 81 00:02:49,472 --> 00:02:51,520 So I've got a player group config 82 00:02:52,032 --> 00:02:54,080 And then I've got all these nodes that are 83 00:02:55,104 --> 00:02:57,152 I want to add the route player no 84 00:02:57,408 --> 00:02:58,432 To the player 85 00:02:58,944 --> 00:03:00,736 By clicking the player note in 86 00:03:00,992 --> 00:03:01,504 Snowden 87 00:03:01,760 --> 00:03:02,272 In group 88 00:03:02,528 --> 00:03:03,040 And then click 89 00:03:03,296 --> 00:03:03,808 Add 90 00:03:04,064 --> 00:03:04,576 Click ok 91 00:03:05,088 --> 00:03:11,232 So why group guys is it essentially an identifier that can be accessed from anywhere 92 00:03:11,488 --> 00:03:12,000 In the cold 93 00:03:12,256 --> 00:03:13,536 We're going to be able to get 94 00:03:14,048 --> 00:03:17,120 All the nodes in this player group in order to find 95 00:03:17,632 --> 00:03:18,144 Aeroplane 96 00:03:18,400 --> 00:03:21,472 I might go back to my game camera scene in open up the Script 97 00:03:21,984 --> 00:03:23,264 By clicking the Script button 98 00:03:23,776 --> 00:03:28,640 In our process method what we can do is working to replace this past line or going to say 99 00:03:28,896 --> 00:03:29,408 Tree 100 00:03:30,176 --> 00:03:31,968 Which gets the current steam train 101 00:03:32,480 --> 00:03:33,504 Get nose 102 00:03:35,552 --> 00:03:36,832 And then 103 00:03:37,088 --> 00:03:37,600 Player 104 00:03:37,856 --> 00:03:39,648 And then we can do as we can save our 105 00:03:39,904 --> 00:03:40,928 Play nodes 106 00:03:41,696 --> 00:03:45,792 No notice I said clear loads here and notice out this says get no 107 00:03:46,048 --> 00:03:48,608 Group forget nose and group function return 108 00:03:48,864 --> 00:03:50,912 Every note that exist in the playgroup 109 00:03:51,168 --> 00:03:52,192 Which means that a return 110 00:03:52,448 --> 00:03:53,216 Tenerife 111 00:03:53,728 --> 00:03:55,776 But only interested in the first result 112 00:03:56,800 --> 00:03:58,080 What can I do in if statement 113 00:03:59,104 --> 00:03:59,872 Clear nose 114 00:04:00,128 --> 00:04:00,640 Die 115 00:04:00,896 --> 00:04:01,664 Size 116 00:04:02,432 --> 00:04:03,200 Which of the funk 117 00:04:03,456 --> 00:04:05,504 So checking the length of player now 118 00:04:06,016 --> 00:04:07,296 Is greater than 0 119 00:04:07,552 --> 00:04:09,856 Then we're going to put the Colin at the end in 120 00:04:11,648 --> 00:04:12,416 Ingenious 121 00:04:12,672 --> 00:04:14,976 What tabs are the way that blocks are the term 122 00:04:15,488 --> 00:04:17,536 It's kind of white Python in that sense 123 00:04:17,791 --> 00:04:19,839 So if statements need to have 124 00:04:20,095 --> 00:04:21,631 All of the block indent 125 00:04:22,143 --> 00:04:24,447 Functions need to have all their blocking 126 00:04:24,959 --> 00:04:25,983 And so on and so forth 127 00:04:26,495 --> 00:04:28,799 So far player knows that size is greater than 0 128 00:04:29,311 --> 00:04:30,847 Then what we can do as we can say 129 00:04:31,103 --> 00:04:33,663 Via player is equal to player mode 130 00:04:34,431 --> 00:04:36,479 And then we can drop the index 131 00:04:36,991 --> 00:04:40,063 And this is similar to other programming languages use the brackets 132 00:04:40,319 --> 00:04:41,599 And then the index that 133 00:04:41,855 --> 00:04:42,367 I want to get 134 00:04:42,879 --> 00:04:44,159 So when we do it display 135 00:04:44,415 --> 00:04:47,231 Well the simplest thing to do it as we can say after 136 00:04:47,743 --> 00:04:48,767 Is equal to 137 00:04:49,279 --> 00:04:49,791 Claire 138 00:04:50,815 --> 00:04:51,327 Global 139 00:04:51,583 --> 00:04:52,095 Position 140 00:04:52,607 --> 00:04:55,679 Now you'll notice that you're not getting in tallaght sense here 141 00:04:56,191 --> 00:04:57,215 When you 142 00:04:57,471 --> 00:04:59,263 Two player dart global position 143 00:04:59,519 --> 00:05:00,543 And the reason is 144 00:05:01,567 --> 00:05:04,383 Godot does not know what the type of 145 00:05:04,639 --> 00:05:05,151 Play it 146 00:05:05,663 --> 00:05:07,455 We know that it's a no to die 147 00:05:07,711 --> 00:05:08,991 That has global position 148 00:05:09,247 --> 00:05:10,271 Qudos 149 00:05:10,527 --> 00:05:14,879 The only thing that's returned from getting those in group is an array of a node 150 00:05:15,391 --> 00:05:15,903 Justin 151 00:05:16,415 --> 00:05:18,975 Because that's the bass type that all notes inherit 152 00:05:19,231 --> 00:05:21,279 And so that's the safe way to return 153 00:05:21,535 --> 00:05:22,559 All the nodes in a 154 00:05:23,071 --> 00:05:23,839 So imagine 155 00:05:24,095 --> 00:05:25,631 If I had in the players 156 00:05:26,143 --> 00:05:29,471 Another note type that was like a control now 157 00:05:29,727 --> 00:05:30,495 Or 158 00:05:31,519 --> 00:05:32,543 Clean nose 159 00:05:32,799 --> 00:05:37,663 I can have a mixture of nodes in this list that's Returned in this array data return 160 00:05:37,919 --> 00:05:38,431 That 161 00:05:38,687 --> 00:05:40,991 Do not have a global position 162 00:05:41,503 --> 00:05:44,319 And so that's why it does not recommend 163 00:05:44,575 --> 00:05:47,903 Global position here because it doesn't know what the exact 164 00:05:48,927 --> 00:05:49,951 Now if you want 165 00:05:50,207 --> 00:05:53,023 What you can do to get that intelligence is you can say 166 00:05:53,535 --> 00:05:54,815 Since we know the type of 167 00:05:55,583 --> 00:05:58,399 You can say I want to grab the first player note 168 00:05:58,655 --> 00:05:59,423 As 169 00:05:59,679 --> 00:06:00,447 A note 170 00:06:01,471 --> 00:06:03,007 And so that's going a cast 171 00:06:03,263 --> 00:06:04,287 Player variable 172 00:06:04,799 --> 00:06:06,079 To type notes 173 00:06:06,591 --> 00:06:09,407 And then we can say player that global position 174 00:06:09,663 --> 00:06:12,479 See how we get all of our lord to the related 175 00:06:12,735 --> 00:06:14,271 Please in our 176 00:06:15,039 --> 00:06:17,599 Going to be using tights to heavily however 177 00:06:17,855 --> 00:06:20,415 We will sometimes use it when it's convenient 178 00:06:20,927 --> 00:06:22,463 For intelligence 179 00:06:23,231 --> 00:06:23,999 You can 180 00:06:24,255 --> 00:06:27,071 Fully type your gdscript using static type 181 00:06:27,583 --> 00:06:31,935 That's not something I'm going to spend too much time doing in this course but just knows 182 00:06:32,191 --> 00:06:33,983 You can use types everywhere 183 00:06:34,751 --> 00:06:38,335 And actually I don't think we don't want this to be the opposite were just going to 184 00:06:38,591 --> 00:06:39,871 The cameras global position 185 00:06:40,639 --> 00:06:41,407 To be equal to 186 00:06:41,663 --> 00:06:42,175 Can you play 187 00:06:42,431 --> 00:06:45,247 What position offset is a property that you more so 188 00:06:45,503 --> 00:06:46,783 To use for screen 189 00:06:47,295 --> 00:06:48,063 Something to run this 190 00:06:48,319 --> 00:06:49,599 And see if it works 191 00:06:50,111 --> 00:06:51,135 And is not working 192 00:06:51,391 --> 00:06:53,951 I think for a second why it's not working 193 00:06:54,719 --> 00:06:59,327 If you answered because we haven't added the game camera to our main scene 194 00:06:59,583 --> 00:07:00,351 Then you're right 195 00:07:00,607 --> 00:07:03,679 This is going to happen all like when you're building your dog 196 00:07:03,935 --> 00:07:09,055 If your new tikitail you'll be running your seen wondering why a change you made is not working 197 00:07:09,311 --> 00:07:10,591 That's because we 198 00:07:10,847 --> 00:07:13,151 Built the camera in isolation here 199 00:07:13,407 --> 00:07:13,919 Lights on 200 00:07:14,175 --> 00:07:14,687 Scene 201 00:07:14,943 --> 00:07:17,503 We haven't added that seemed to our main 202 00:07:17,759 --> 00:07:20,319 So let's go ahead instantiated childnet again 203 00:07:20,575 --> 00:07:21,855 By right clicking on me 204 00:07:22,623 --> 00:07:23,903 Instantiate child scene 205 00:07:24,159 --> 00:07:24,671 And then 206 00:07:25,695 --> 00:07:26,463 H camera 207 00:07:26,719 --> 00:07:28,255 And I want to put the camera 208 00:07:28,511 --> 00:07:30,047 The first child in the sea 209 00:07:30,303 --> 00:07:35,423 This is one note that is not affected by draw order the game camera 210 00:07:35,679 --> 00:07:36,959 Does not take to order in 211 00:07:37,215 --> 00:07:38,239 A counter when it's rendering 212 00:07:38,495 --> 00:07:41,055 So I just like to put it first so it's kind of out of the way 213 00:07:42,079 --> 00:07:42,847 So now what 214 00:07:43,103 --> 00:07:44,127 And now you can see 215 00:07:44,383 --> 00:07:45,151 The camera is full 216 00:07:45,407 --> 00:07:45,919 IPlayer 217 00:07:46,175 --> 00:07:50,271 What's with the camera a little bit nicer by introducing smoothing to the camera 218 00:07:50,527 --> 00:07:52,831 So most games your notice when you're playing 219 00:07:53,087 --> 00:07:54,111 The camera is not 220 00:07:54,623 --> 00:07:55,647 100% 221 00:07:55,903 --> 00:07:56,671 To the player 222 00:07:56,927 --> 00:07:59,743 Actually has a slight drag behind it 223 00:07:59,999 --> 00:08:01,023 While you're moving 224 00:08:01,279 --> 00:08:02,047 That's because 225 00:08:02,303 --> 00:08:02,815 Most 226 00:08:03,071 --> 00:08:05,375 Professionally made games have cameras 227 00:08:05,631 --> 00:08:06,655 That are smooth 228 00:08:07,167 --> 00:08:08,191 Which means that they don't 229 00:08:08,703 --> 00:08:13,311 Just automatically set themselves to the position they actually have a little bit of travel 230 00:08:13,567 --> 00:08:15,615 Which makes them feel a lot more now 231 00:08:16,127 --> 00:08:18,175 We're going to do that is we're going to 232 00:08:18,431 --> 00:08:19,199 Is framerate in 233 00:08:19,455 --> 00:08:19,967 Dependant 234 00:08:20,479 --> 00:08:20,991 So 235 00:08:21,247 --> 00:08:24,575 We've got our camera script here so go ahead and open the car 236 00:08:25,087 --> 00:08:27,647 Back up I'm going to do is at the top of the 237 00:08:28,159 --> 00:08:30,207 Create a new variable 238 00:08:30,463 --> 00:08:32,255 Target underscore position 239 00:08:32,767 --> 00:08:34,303 And then you can is initialised 240 00:08:34,559 --> 00:08:35,839 Two vector 2.0 241 00:08:36,095 --> 00:08:37,887 Which is the constant for 242 00:08:38,143 --> 00:08:41,471 SE2 0xn 0 Wykeham 243 00:08:41,983 --> 00:08:44,799 Instead of setting the global position herein meaning 244 00:08:45,311 --> 00:08:48,895 Order do instead is we're going to assign our target 245 00:08:49,919 --> 00:08:51,967 Tool the player glow up 246 00:08:54,271 --> 00:08:56,575 Ok and we're going to remove that line where 247 00:08:56,831 --> 00:08:58,111 Set the global position 248 00:08:58,879 --> 00:09:01,951 And now I'm going to do as I'm actually going to take this and terrible 249 00:09:02,463 --> 00:09:03,231 Cut it out 250 00:09:03,743 --> 00:09:05,023 Add a couple of new Lines 251 00:09:05,279 --> 00:09:07,583 So the guitar recommended silent 252 00:09:07,839 --> 00:09:09,375 Two new lines in between 253 00:09:09,631 --> 00:09:10,143 Switch function 254 00:09:10,399 --> 00:09:11,423 So that's why would you ring me 255 00:09:11,679 --> 00:09:13,471 Call this a quiet 256 00:09:15,263 --> 00:09:17,823 We're going to open and close parentheses and then put a corner 257 00:09:18,079 --> 00:09:19,871 And paste our code in 258 00:09:20,127 --> 00:09:21,919 And we're seeing an aerosol can 259 00:09:22,175 --> 00:09:23,967 Passing the process for the air stop 260 00:09:24,479 --> 00:09:25,247 And we need to 261 00:09:25,503 --> 00:09:26,527 An extra line 262 00:09:27,039 --> 00:09:28,063 What the proper spacing between 263 00:09:28,575 --> 00:09:30,367 Acquire target is going to do 264 00:09:30,623 --> 00:09:31,647 Is just going to assign 265 00:09:31,903 --> 00:09:33,439 The target position but only 266 00:09:33,695 --> 00:09:34,207 What's the player 267 00:09:34,975 --> 00:09:36,255 Sonar process method 268 00:09:36,767 --> 00:09:37,535 We're going to call 269 00:09:39,327 --> 00:09:39,839 Just like 270 00:09:40,351 --> 00:09:43,167 And so that's going update our target position everything 271 00:09:43,679 --> 00:09:45,471 And then we're going to blow up position 272 00:09:45,983 --> 00:09:47,007 Is equal to 273 00:09:47,519 --> 00:09:48,543 Global position 274 00:09:50,335 --> 00:09:51,615 And loop stands for 275 00:09:51,871 --> 00:09:52,895 Linear interpolated 276 00:09:53,407 --> 00:09:55,199 Linear interpolation if you're not 277 00:09:55,455 --> 00:09:59,551 Familiar is basically having a star position in any position 278 00:10:00,345 --> 00:10:02,248 Subtitled by online-courses.club We compress knowledge for you! 279 00:10:02,250 --> 00:10:02,111 In specifying a percentage 280 00:10:02,623 --> 00:10:06,719 That represents the percent of the distance between those 281 00:10:06,975 --> 00:10:07,743 To possess 282 00:10:08,255 --> 00:10:09,023 So another word 283 00:10:09,279 --> 00:10:10,047 If I have 284 00:10:10,303 --> 00:10:11,583 Point a witch 285 00:10:12,095 --> 00:10:13,375 10 pixels to the right 286 00:10:13,631 --> 00:10:16,447 And point B which is at the origin 287 00:10:16,703 --> 00:10:17,215 0 288 00:10:17,471 --> 00:10:19,263 Then alert of 50% 289 00:10:19,775 --> 00:10:23,103 Would return to me a position that is 5 pics 290 00:10:24,639 --> 00:10:27,967 The percent that you pass into a linear interpolate represent 291 00:10:28,223 --> 00:10:28,991 A point 292 00:10:29,247 --> 00:10:30,527 Between the two supply 293 00:10:30,783 --> 00:10:31,807 That is 294 00:10:32,063 --> 00:10:32,831 The supply 295 00:10:33,087 --> 00:10:33,599 Percent 296 00:10:33,855 --> 00:10:34,367 Between 297 00:10:34,623 --> 00:10:37,183 Hopefully that makes sense but you're going to see how it works 298 00:10:37,695 --> 00:10:38,975 Real quick general make 299 00:10:40,767 --> 00:10:43,583 So I'm going to learn from Cameron's current position 300 00:10:44,095 --> 00:10:45,375 To the target position 301 00:10:46,911 --> 00:10:48,703 And this is where our DELTIC 302 00:10:48,959 --> 00:10:50,751 In a place so I can put something like .5 303 00:10:51,007 --> 00:10:53,823 In here that's going to say is every frame 304 00:10:54,079 --> 00:10:55,103 Move the camera 305 00:10:55,359 --> 00:10:57,151 50% of the way 306 00:10:57,407 --> 00:10:57,919 2 307 00:10:59,199 --> 00:11:04,319 That's essentially just going to be stuck to the player because if you're games running at let's go 400 308 00:11:05,343 --> 00:11:08,927 Basically after three frames it's going to be on top of the player 309 00:11:09,183 --> 00:11:10,463 Add a player 310 00:11:10,719 --> 00:11:12,255 Is not going to notice 311 00:11:12,511 --> 00:11:13,791 Camera smoothing at all 312 00:11:14,303 --> 00:11:15,327 This is why we're going 313 00:11:15,583 --> 00:11:16,863 Framerate independent live 314 00:11:17,119 --> 00:11:19,423 It's a way of doing lerping AKA 315 00:11:19,679 --> 00:11:20,191 Smooth 316 00:11:20,703 --> 00:11:26,847 That is independent of your favourite so I could run at 1000 frames per second and would still behave the same as of the 317 00:11:27,103 --> 00:11:27,615 Where was running 318 00:11:27,871 --> 00:11:28,639 At 10 319 00:11:29,407 --> 00:11:31,455 The way that we do this is we take 320 00:11:31,711 --> 00:11:32,735 1.0 321 00:11:33,503 --> 00:11:34,015 Minor 322 00:11:34,527 --> 00:11:35,551 And you can either 323 00:11:35,807 --> 00:11:36,319 How 324 00:11:36,575 --> 00:11:37,087 Here 325 00:11:37,343 --> 00:11:38,111 And provide 326 00:11:38,367 --> 00:11:39,391 A base 327 00:11:39,647 --> 00:11:40,927 I like to use 328 00:11:41,183 --> 00:11:42,463 Which is the natural x 329 00:11:42,719 --> 00:11:43,999 Which actually gives 330 00:11:44,255 --> 00:11:46,559 A very natural feeling smooth 331 00:11:47,071 --> 00:11:48,863 So we take 1.0 - 332 00:11:49,375 --> 00:11:50,911 In for a float we want to 333 00:11:51,167 --> 00:11:53,215 The negative Delta 334 00:11:53,471 --> 00:11:53,983 X 335 00:11:54,239 --> 00:11:58,335 And we have some smoothing value so we're try 10 336 00:11:58,591 --> 00:11:59,103 Bradford 337 00:11:59,615 --> 00:12:00,127 Now 338 00:12:00,383 --> 00:12:01,919 This mathworks 339 00:12:02,175 --> 00:12:04,223 I'm going to attach resources 340 00:12:04,479 --> 00:12:06,527 In this lesson with links 341 00:12:06,783 --> 00:12:08,831 Explains the exact mathematics behind this 342 00:12:09,087 --> 00:12:10,367 I just know that 343 00:12:10,623 --> 00:12:11,903 This formula where you too 344 00:12:12,415 --> 00:12:12,927 One point 345 00:12:13,951 --> 00:12:15,487 The natural exponent 346 00:12:15,743 --> 00:12:19,839 Which is a mathematical constant and then raised by some negative power 347 00:12:20,095 --> 00:12:21,375 And that produces 348 00:12:21,631 --> 00:12:23,167 Mouth that makes it 349 00:12:24,703 --> 00:12:30,079 So again if that's not quite clear in the mouth and don't worry we're going to be using this sort of Formula 4 article 350 00:12:30,335 --> 00:12:31,615 How to create smooth learning 351 00:12:31,871 --> 00:12:33,407 Anna create a really nice 352 00:12:33,663 --> 00:12:34,687 Feeling effects 353 00:12:35,199 --> 00:12:35,967 What's going to run the game 354 00:12:36,223 --> 00:12:38,271 And now you can see if you move around 355 00:12:38,527 --> 00:12:41,343 That your camera is dragging behind the players 356 00:12:41,855 --> 00:12:43,135 And when you stop 357 00:12:43,391 --> 00:12:45,183 The camera takes a few frames 358 00:12:45,695 --> 00:12:47,487 To Settle on the place 359 00:12:47,743 --> 00:12:48,255 Position 360 00:12:48,511 --> 00:12:49,023 Great 361 00:12:49,279 --> 00:12:52,095 So that's it for this lesson with our camera done 362 00:12:52,351 --> 00:12:53,631 We're going to move on to 363 00:12:54,143 --> 00:12:56,191 Working on a basic enemy 23244

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