All language subtitles for 7. Moving the Player at a Normal Speed

af Afrikaans
ak Akan
sq Albanian
am Amharic
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
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

Original subtitles

In this video we're going to take a look at why we're moving so quickly to the right.

When we type transform not translate vector 3D outright in order to understand this we have to understand

how update is working.

Update is called once per frame typically about 60 frames per second vector 3D out right is the equivalent

of typing new vector 3.

Unit on the x 0 in 0 on the wife Z.

When we say one unit in unity that's the equivalent of one meter in the real world.

So what's happening here is we're moving our player to the right one meter per frame 60 meters per second

what we actually want to do is move our player to the right one meter per second.

So we need to do is we need to convert one meter per frame to one meter per second in the way we do

that is by incorporating real time and to do that we multiply the vector by time delta time time no

doubt the time is going to do the conversion process from frame rate dependent to real minutes seconds

and hours for us time not total time can be thought of as one second.

So if we actually were to run this and we actually were to play this you'll see here that we are now

moving one meter per second to the right and we can actually witness our character moving the technical

term for time not that the time is really the time and seconds it took to complete the last frame to

the current frame and in reality what's really happening here is it allows us to use real time.

So if I needed to create for example a five second timer I could just add timed I don't the time to

a variable and check it for five seconds.

This is the equivalent of incorporating real time into use it you simply just multiply it by a vector.

Now what I want to get into next is how can we move five meters per second.

Well right now we're moving one meter per second.

All I have to do to move five meters per second would be to multiply our vector three not right by five

and then multiply that by timed out delta time.

This is going to convert to five meters per second if we hop into unity once our code is compiled I

can run the application and you'll see here that we are now moving five meters per second.

Now how does that work and why does that work.

Well this comes down to something in mathematics called the distributive property and what it does is

you can see here that we have vector three right multiplied by five multiplied by real time.

And what's happening here is basically what's on the side of the parentheses is getting multiplied by

what's inside the parentheses.

So here we have 1 times 5 which becomes 5 and then we multiply that by real time.

So we're moving five units to the right.

Anything multiplied by zero stays zero.

What happens if I change this to vector three dot left.

Well if I change that to vector three about left that's the equivalent of typing new vector three negative

one and then still I have a five here so negative 1 times 5 is going to be negative 5 0 times 5 is going

to be 0 in 0 times 5 on the Z is going to be zero.

So now we're moving negative 5 units to the left per second because we're using real time.

So I hope that makes sense to you go ahead and test it out and you should be able to move me just for

a second in the next video we'll take a look at creating our first variable.

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