Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
So what if I wanted to allow the player
Actually use the keyboard to move
The Block
I'm back in the unity and clean up a little bit so it's delete these here
So now all we have is a player I'm going to save our scene
And what we can do is actually go to our unity
Input 2-litre project settings here you can actually go to the input manager
And it says your this is where you can configure the controls to use with the unity engine that input
So all this really does
Is it allows us to basically map which keys are part of which category security we have
Fire to fire shooting maybe that's reloading is a jump
Mouse x Direction y Direction
Is all sorts of various what they called axes
Subtitled by -♪ online-courses.club ♪- We compress knowledge for you! https://t.me/joinchat/ailxpXoW3JVjYzQ1
So we can go to the horizontal one this is where the player is going to move left and right and you'll see it's name is horizontal
And the negative button is the last key
The positive button is the right key
The alternative negative button is a that's what I usually like to use when I'm playing game for the keyboard
An alternative positive bunnies
You guessed it die
The same sort of logic applies for vertical as well
Down key up key
S in double
And Paisley what happens when I press any of these keys
You basically smooth
The value of the flow values in the case of horizontal when I press the d key it's moves to pass
1 or
Another way of putting it
Lyrics
And eases towards positive one when I let it go it eases back 20
Anyway press left
The negative button it goes to -1
Can I could show you
How is works in our scrap
Search a script here
In all going to do is type input
Dad get access
An end
Quotes horizontal
X speed
X x delta time
So
To review here
Our position is going to
Increase along the x-axis
This is the x axis equation basically so my current horizontal value which is
Going to be one if I'm pressing d or negative one of them putting a or left to right on the keyboard
X the speed value
And we could actually rename this to be a little bit more
I guess into it
So let's do a speed multiplier make sure we take that and copy down here
So what are Speed multiplier
NN x
Our time that delta time to insure it
Not dependant on the frame rate of each computer that's playing the game
Can we get say that out
And what's my car speed multiplier just a value of 1
Fell in save r script
Will we go back into unity we wait for it to compile looks like we have no ears
Go ahead and hit play and see if it actually works
So when I'm pressing the right key at the ride on a personal f key
I can go to the left
Very cool
And guys we can use the same sort of logic
In the Y Direction as well so it's jump back in or scripture
And just simply copy this
Entire equation here
Empire Cinema y axis Museum at here
Tell some sort of
Logical exactly just copy the speed multiplier and the Delta time
In remove it completely
And I just multiply it here
Can we do I have to do it multiple times
Say that out
And what I also want to do is just go ahead and serialise this private speed multiplier value
So that we can go and tell immunity in twechar
Twilighting
Go ahead and hit play here
As you can see we have a bit of a bug and pressing left and right here but for some reason it
Putting us up and down
Why is that
What's go back into r script
You can see it didn't actually fire and air
Not all bugs are simply glitches or errors sometimes there but you intentionally put another code in you didn't realise
Solihull planning notice
I have two horizontal values
My field here
I'm at the second value in the vector3 is y
Play music vertical
Don't save it out
And let it play
Set looks like I move left and right
Up and down very good
Alright
Telescope hinges selespeed x 5
Save it
And
This will probably be a great way to explain what's happening
Do you know this How I slowly decelerate
That actually because when I release the left key
In this case I'm pressing
A and releasing it
The left input value is actually lerping or smoothing or easing back towards
Slowly goes back to zero
Now it's one
And then I'll let go and it slowly
Goes back to zero
Just to clarify that let's go ahead and just debugger
Debug
That log
And you'll use this one I like I said memorise debug.log
Let's check the horizontal
Value and see what it is
Play here
And take a look in the console window
What the value is
If you ever see them stacking like this it's certainly annoying so all we have to do is click collapse
And now that shop in one
Field hearing you can see that
This is the amount
Earth x
That this message has been communicated and right here is the actual value
So if I press left here
You see the value is 1
-1 almost -1
Got the right almost positive one in it goes back to zero
So that is what's happening
When we use input that get access
So that is how we move the player
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.