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
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
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
In this video, we're going to implement the iconic jump from Mega man and Mega man clones.
Again, our goal isn't to simply copy Mega man, but just be inspired by it.
And this is kind of a big part that makes the game work.
If we only press the button a little bit, we just get a short hop.
But if we hold the button, we get a very long jump.
And to do that, we first want to worry about the short hop and adjust the gravity accordingly.
In the last video, we already set the gravity to three to make it a lot heavier, and this is the value
used for most platformers.
But in this case, again, we actually want to make it even higher so we can have this short hop and
the long jump.
And the value that I found works best is 5.5.
And if we just go back now, you can see we get this very short hop.
But even now this is a little bit too high for the short hop I want to have.
So we can again go to Jump Velocity and set it a little bit lower to 600.
Like this.
And this gives us this very short hop that I want the players to be able to use if they want to have
very precise platforming.
Next up, we want to implement the max hold time, and this is something we don't want the enemies to
have.
So now we can just compile and save this action to our base, and the rest we're going to implement
in the player.
So in the BP player, we can then again go to the viewport just to look at the player.
And this setting is actually not on the character movement component but it is on the character.
So here on the base we can look for max hold time.
And this defines how long you're allowed to hold the jump button and still get momentum out of it.
And the value that I found best here is 0.4.
Let's try this out.
And now if I press the button we always get this long jump.
We actually aren't able to pick between the short hop and the long jump, even if we let go of the button
early.
So to fix that we have to go to the BP player.
And on the event graph we have to look for our AI, a jump.
And actually we need to stop jumping not just from canceled but also from completed.
So completed triggers.
If we let go of the button and it will trigger the stop jumping now so we can go here and now I can
just hold the button for a little bit.
I get this short hop if I hold it for a long time, we get this very long jump.
And this is a very distinct feature of these kind of games that give you a lot of air control.
But the air control still feels kind of weird.
We can kind of jump in one direction, but we just keep on drifting.
So on the player now VP player on the character movement component, we now want to again set our air
control.
And this time we actually want to go full 1.0.
Just compile and save.
And this gives us more air control.
But it still doesn't let us just move left and right how we want.
Which again is a feature of these kind of games.
We can just kind of keep on drifting in one direction and we have to like fight against the momentum
we already have.
But in this case, we want to be able to freely just go left and right while we're jumping.
And again, there is a simple setting for this.
On the VP player.
On the movement component we can look for lateral friction.
So the higher this value is, the easier it lets us fight against the momentum that we already have
in the air.
And again I've been playing around with these values and 50 is the one that I came up with that felt
about right.
So compile and save and go in here.
And now I can just freely move left and right while in the air.
Right, like I can go right and then steer against it and immediately move in the other direction,
which makes for very precise platforming controls.
And when it comes to the character movement, we still have the wall slide left to do.
We have the ground slide left to do, but I believe the projectiles and the shooting is more important,
so I want to cover that first, and that's what we're going to do in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.