How To Double Jump In Unity

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 155

  • @gideonsparks3183
    @gideonsparks3183 7 місяців тому +4

    It actually makes me mad how simple this was to implement. These tutorials are great man!

  • @chez4010
    @chez4010 2 роки тому +70

    Just dont give up man, YOU CAN DOUBLE JUMP. Don’t let a concussion discourage you :-)

  • @naimmop4481
    @naimmop4481 Рік тому +8

    Your style of coding in these tutorials are very impressive, I would've never thought of using boolean variables to do this, normally I would use integers and have them count the jumps. Amazing video brother!!!

  • @mounirrouibi2669
    @mounirrouibi2669 Рік тому

    Why am I just discovering this goat! Instructive, short, and well-edited videos topped with a great sense of humor. I am just impressed!

  • @enesyilmaz95
    @enesyilmaz95 2 роки тому +3

    This tutorial is gold very simple and short i was also trying to make the short jump and got it here as a bonus !

  • @guille_sanchez
    @guille_sanchez 2 роки тому +3

    Excellent video, quickly getting to the point and the code works really smoothly, keep up the nice work!

  • @giacomofranzoso3114
    @giacomofranzoso3114 9 місяців тому

    Very elegant solution, thank you man!

  • @strafe4165
    @strafe4165 8 місяців тому +3

    Super helpful, loving your tutorials and content!! I do have a question though, and that is if I'm using coyote time and jump buffering, how would I implement this double jump?

    • @bendux
      @bendux  7 місяців тому +1

      We have a solution for that on our Discord server. Feel free to join!

  • @christopherchu2516
    @christopherchu2516 2 роки тому

    awesome short and to the point video!

  • @prathamkorade5499
    @prathamkorade5499 2 роки тому +1

    GREAT TUTORIAL BROTHER!!!

  • @willwilson4486
    @willwilson4486 2 роки тому +2

    Love your videos, great job!

  • @VaneTheLocal
    @VaneTheLocal Рік тому

    THANK YOU, SO MUCH! EXACTLY WHAT I WAS LOOKING FOR

  • @AKIRAaims
    @AKIRAaims Рік тому

    Bro the joke at the beginning was that good amazing video! (i didnt watched it yet but i just know)

  • @mediamermaid333
    @mediamermaid333 11 місяців тому +1

    Thank you!!

  • @InfiniteVisions612
    @InfiniteVisions612 2 роки тому

    The joke you made in the start was the reason i sub keep up teh work lol

  • @nelouchedev
    @nelouchedev Рік тому

    It works perfectly thank you so much !

  • @neenaw
    @neenaw 2 роки тому

    another pogchamp tutorial my guyyy

  • @TheBabro93
    @TheBabro93 Рік тому

    I put a like instantly after 14seconds when I heard the hospital story lol

  • @Roughartwork
    @Roughartwork 2 роки тому

    Thankyou so much 💓 i have learned double jump method Thankyou 😊✌

  • @pvpplayz2887
    @pvpplayz2887 Рік тому +3

    Hey! if you wouldn't mind would you do a tutorial on how to make a jump like in Celeste, in which you can press jump before you reach the ground and it still goes through when you do? I think it would be super helpful for a lot of us!

    • @bendux
      @bendux  Рік тому +2

      I already have a video about coyote time and jump buffering on my channel.

    • @pvpplayz2887
      @pvpplayz2887 Рік тому

      @@bendux Yea I found it just after I commented I'm super sorry, thank you for giving the community such awesome tutorials!

  • @briosh.mp4
    @briosh.mp4 Рік тому

    ty for this amazing tutoriel ! 😄

  • @DMaceGT
    @DMaceGT 2 роки тому +4

    This does work but I want to set a power up which will grant me double jump and can be used on every scenes after that instead of making it always active on the player.
    If you can make a video on that, Thank you in advance :3

    • @bendux
      @bendux  2 роки тому +1

      Join our Discord server, and let's solve your problem together!

  • @Tatoie
    @Tatoie Рік тому

    thanks! even tho this is my first time watching you, i subscribed and liked, tutorial helped!

  • @deluxe1697
    @deluxe1697 2 роки тому

    Another great video just when i need it:)

  • @bartwillems7896
    @bartwillems7896 2 роки тому

    Hey man, you really helped me here!!!

  • @thatGameDevGuy
    @thatGameDevGuy Рік тому

    Bruh that was quick

  • @leefy_sf
    @leefy_sf 2 роки тому +1

    hey I have a suggestion for a video! can you make a tutorial for wall jumping? Because I've been trying to add wall jumping to my game for a long time now and tutorials I find don't seem to work, I'd really appreciate you making it! I understand if you can't though. Keep up the good work!

    • @bendux
      @bendux  2 роки тому +5

      I definitely want to make a video about wall jumping in the future.

  • @joshpreston4957
    @joshpreston4957 Рік тому +1

    I was stuck for awhile notice that in the If statement that sends double jump to false that he is using the method GetButton() and not the more common GetButtonDown(). That is what fixed it for me:
    if (IsGrounded() && !Input.GetButton("Jump"))

    • @brucelee7782
      @brucelee7782 Рік тому

      omg same problem, thank you brother

  • @sigma9.90
    @sigma9.90 Місяць тому

    when using this, my player wont jump half the time, i have to press the button a good few times before it works

  •  Рік тому +1

    Love you

  • @animationsbelike
    @animationsbelike 2 роки тому

    Thank you! :D

  • @AbdulAhad-lb4ff
    @AbdulAhad-lb4ff 2 роки тому

    He's back Let's goo

  • @deanv1265
    @deanv1265 2 роки тому

    Best vid in town

  • @spemeryt
    @spemeryt 2 роки тому

    ello, great video mate! May I know what video did you do the animation for the player? and how can I make the snowy effect

    • @bendux
      @bendux  2 роки тому

      I learned everything I know about animations from Brackeys. I definitely want to make a video about Unity's particle system in the future.

    • @spemeryt
      @spemeryt 2 роки тому

      @@bendux Thanks so much mate, I'm looking into it :D

  • @houssamboudiar7689
    @houssamboudiar7689 2 роки тому

    you got me laughing bro 0:04

  • @martyl6424
    @martyl6424 7 місяців тому

    great vid, but how could you implement this so you are able to double jump from wall too ? i looked your walljump tutorial also but somehow i cant combine this doublejump with walljump

    • @bendux
      @bendux  7 місяців тому

      We have a solution for that on our Discord server. Feel free to join!

  • @skydragon601
    @skydragon601 2 роки тому +2

    So whenever I write a line of code with "isGrounded" in it, it says it doesn't exist in the current context, so I wrote the line "void isGrounded() {}", and after I did that, I typed the line "if (isGrounded() | | doublejump)", it says that the operator '| |' cannot be applied to operands of type 'void' and 'bool'.
    And even when I put operator "&&" in the line "if (isGrounded() && !Input.GetButton("Jump"))" it says the same thing about '&&', so what do I do about the isGrounded problem?

    • @bendux
      @bendux  2 роки тому

      Would you like to show me your code on Discord?

    • @skydragon601
      @skydragon601 2 роки тому

      @@bendux sure

    • @snipermonke6812
      @snipermonke6812 Рік тому

      instead of 'void', write 'bool isGrounded()'

    • @sogyshorts5662
      @sogyshorts5662 Рік тому

      I have the same problem. Did you solve it?

  • @defded7733
    @defded7733 Рік тому +1

    I really like your tutorials could you upload more videos and more often ? Please !!!!

    • @bendux
      @bendux  Рік тому +1

      I'm currently working on a new tutorial.

  • @laughingstar3945
    @laughingstar3945 Рік тому

    Hey man i kinda dont understand the syntax for the Vector2 when you put the doubleJumpingPower

    • @bendux
      @bendux  Рік тому

      learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/conditional-operator

  • @Gigga_Appel
    @Gigga_Appel Рік тому

    Please can u make a tutorial abt the snow flakes in the back??

    • @bendux
      @bendux  Рік тому

      I definitely want to make a video about Unity's particle system in the future.

  • @aniime4006
    @aniime4006 Рік тому

    Do you have a video showing how to change character animations when active compared to static character animations?

    • @aniime4006
      @aniime4006 Рік тому

      like your character when running, it will move its feet

    • @bendux
      @bendux  Рік тому +1

      I definitely want to make a video about animations in the future.

  • @Joksys
    @Joksys 2 роки тому +2

    How would you do this with the new input system?

    • @bendux
      @bendux  2 роки тому +2

      We have a solution for that on our Discord server. Feel free to join!

  • @meltedistaken
    @meltedistaken Рік тому

    Would there be a way to where if I walk off of a ledge, I have the jump? Currently I have to jump to activate the ability to double jump.

    • @bendux
      @bendux  Рік тому

      We have a solution for that on our Discord server. Feel free to join!

  • @tonenfich4582
    @tonenfich4582 Рік тому

    In my project the ground layer check just dosent work i can set the ground layer to everything i want and i can just jump every time you can just double jump how ofthen you want

    • @bendux
      @bendux  Рік тому

      Would you like to show me your code on Discord?

  • @bigbossross286
    @bigbossross286 Рік тому

    How does this work with Coyote timing and buffering jumps? I can't seem to get all of them to work at the same time

    • @bendux
      @bendux  Рік тому

      We have a solution for that on our Discord server. Feel free to join!

  • @gilgaming6858
    @gilgaming6858 Рік тому

    is there a way to limit the double jumps, i have a problem where when the player reaches its apex it will give it a second jump.

    • @bendux
      @bendux  Рік тому

      Would you like to show me your code on Discord?

  • @Blaxe75
    @Blaxe75 Рік тому

    why does the github servers HAVE TO BE DOWN error 500

  • @expertarc3861
    @expertarc3861 2 роки тому

    Can you do a video about croching and dashing as im having trouble finding a good tutorial on it

    • @bendux
      @bendux  2 роки тому +1

      Crouching and dashing are both on my list for future videos.

    • @expertarc3861
      @expertarc3861 2 роки тому

      Cool

  • @Emu-
    @Emu- Рік тому

    will this also work for Character controllers or just rigidbodies

    • @bendux
      @bendux  Рік тому

      What do you mean?

    • @Emu-
      @Emu- Рік тому

      @@bendux Can this script work with Character Controller Component or strictly a Rigid Body Character?

    • @bendux
      @bendux  Рік тому

      @@Emu- The same principle can be applied to other character controllers.

  • @gifex_
    @gifex_ 2 роки тому

    can i ask from where you have this snow in video?

    • @bendux
      @bendux  2 роки тому +1

      I made it myself with Unity's particle system.

  • @nxhackerbg1201
    @nxhackerbg1201 2 роки тому

    can you help me I set the jump button to "W" and wrote a code so that double jump activates once the player is in the air and now whenever I hit the "W" button it takes like really less time for the player to reach the air and double jump subtracts in fraction of second and the player cannot do double jump after that. What do I do? If you are interested I can send you the code in discord

    • @bendux
      @bendux  2 роки тому

      Join our Discord server, and let's solve your problem together!

    • @nxhackerbg1201
      @nxhackerbg1201 Рік тому

      @@bendux OMG sure!!

  • @hiimenvy6174
    @hiimenvy6174 2 роки тому

    I know this video is old but I was wondering why we have to set doublejump = !doublejump instead of just setting it to false? I'm confused as to why that doesn't do the same thing.

    • @bendux
      @bendux  2 роки тому +1

      Setting it to false is not the same as setting it to its opposite value.

    • @hiimenvy6174
      @hiimenvy6174 2 роки тому

      @@bendux I get that but why? I starts off as just true, and then you set it to the opposite value which should be false right? I just don't understand where the difference is coming from.

    • @hiimenvy6174
      @hiimenvy6174 2 роки тому

      Is it just because it's false by default?

    • @hiimenvy6174
      @hiimenvy6174 2 роки тому

      Alright, I figured it out. Instead of setting it to false, we can set it to true and it will simulate the same logic. I just assumed for some reason that c# defaluted booleans to true, not sure why. Also, even if it did we still wouldn't want to set it to false anyway because then we couldn't double jump. Alright, thanks for the help.

  • @-._122
    @-._122 Рік тому +1

    what key would I hit to jump

    • @-._122
      @-._122 Рік тому

      can some one please tell me bc im clicking space but now jumping

    • @bendux
      @bendux  Рік тому

      Edit > Project Settings > Input Manager

    • @-._122
      @-._122 Рік тому

      @@bendux thanks it works now
      also can you make a enemy tutorial?

    • @bendux
      @bendux  Рік тому

      @@-._122 I definitely want to make a video about enemies in the future.

    • @-._122
      @-._122 Рік тому

      @@bendux yes it would be great
      also keep up the great work

  • @ratmoko1
    @ratmoko1 Рік тому

    I'm having a hard time reconciling the double jump after adding coyote time and jump buffering. Anyone else?

    • @bendux
      @bendux  Рік тому +1

      We have a solution for that on our Discord server. Feel free to join!

  • @thundershadow1837
    @thundershadow1837 2 роки тому

    Hello, I really like your videos it helped me a lot with my unity project but I want to ask something in the video that you teach us how to make split-screen in unity you already had 2 controllable players every other video I watch about local multiplayer you had to move the controller to add a player but that doesn't work with the fighting game that I am making so can you make a video about the local multiplayer?

    • @bendux
      @bendux  2 роки тому

      I definitely want to make a video about local multiplayer in the future.

  • @loopgamer01
    @loopgamer01 2 роки тому

    what do you do if you added the coyote time and jump buffering codes
    Thanks

    • @bendux
      @bendux  2 роки тому

      We have a solution for that on our Discord server. Feel free to join!

    • @loopgamer01
      @loopgamer01 2 роки тому

      Found it and it worked
      Thanks!

    • @nuku142
      @nuku142 2 роки тому

      @@loopgamer01 i could not find it, can you please help me?

  • @SaijeMage
    @SaijeMage 2 роки тому

    im having trouble getting this to work after setting up coyote time and jumpbuffer

    • @bendux
      @bendux  2 роки тому +1

      We have a solution for that on our Discord server. Feel free to join!

    • @SaijeMage
      @SaijeMage 2 роки тому

      @@bendux awesome thank you ! those solutions worked perfectly

  • @maksimnarrates1826
    @maksimnarrates1826 Рік тому

    Didn't work for me - the player can jump indefinitely. And console says: "Parameter "Speed" doesn't exist"

    • @bendux
      @bendux  Рік тому

      Make sure that your player and the ground are not on the same layer. By the way, there is a link to the source code in the description.

  • @Benkaera
    @Benkaera Рік тому

    Dj is working, but when he falling from a wall down. i cannot jump

    • @bendux
      @bendux  Рік тому

      Would you like to show me your code on Discord?

  • @chez4010
    @chez4010 2 роки тому +1

    Haha nice another vid

  • @thundercat9993
    @thundercat9993 Рік тому

    thks

  • @enochwade9010
    @enochwade9010 2 роки тому

    I can’t incorporate this double jump into my existing script and it’s driving me insane

    • @bendux
      @bendux  2 роки тому

      Would you like to show me your code on Discord?

    • @enochwade9010
      @enochwade9010 2 роки тому

      @@bendux yes absolutely!!!

    • @enochwade9010
      @enochwade9010 2 роки тому

      I’d be so flipping happy!!!!

  • @ghostkiller2864
    @ghostkiller2864 2 роки тому

    im having trouble , the player jumps too high

    • @bendux
      @bendux  2 роки тому +1

      Increase the gravity scale of your player's Rigidbody 2D component, or decrease the jumping power at the top of the script.

  • @DevNoob
    @DevNoob 2 роки тому

    lmfao double jumping in real life. Can you make a tutorial on that?

  • @Isotonicdev
    @Isotonicdev 10 місяців тому

    how do i add this with wall slide and wall jump

    • @bendux
      @bendux  10 місяців тому

      We have a solution for that on our Discord server. Feel free to join!

  • @srivikas1834
    @srivikas1834 2 роки тому

    Anyone else have a problem where the player keeps on jumping when you keep pressing space?

    • @srivikas1834
      @srivikas1834 2 роки тому

      Nevermind, I just forgot to add the ground layer to Ground

    • @bendux
      @bendux  2 роки тому

      I'm glad you were able to fix it.

    • @srivikas1834
      @srivikas1834 2 роки тому

      @@bendux Thank you for your work. It really helps people like me a lot.

  • @乲
    @乲 Рік тому

    copied the code and well i can infinitely jump soooo (also i only want 1 jump btw i have really been struggling to get it as a begginer hope u can help)

    • @bendux
      @bendux  Рік тому

      Make sure that your player and the ground are not on the same layer.

  • @rolingah
    @rolingah 2 роки тому

    i got infinity jumping following this

    • @bendux
      @bendux  2 роки тому

      Would you like to show me your code on Discord?

  • @elostolol0197
    @elostolol0197 2 роки тому

    Nice dude. But I hope u make more videos. 2vid / weeks 😆

  • @Kazu173_
    @Kazu173_ Рік тому

    it didnt work for me and i didnt get any errors

    • @bendux
      @bendux  Рік тому

      There is a link to the source code in the description.

  • @jaexuka
    @jaexuka 11 місяців тому

    add animation

  • @gg-ti6or
    @gg-ti6or 2 роки тому

    What i need to putin animator

    • @bendux
      @bendux  2 роки тому +1

      You don't need the animator for double jumping.

  • @luckysantillan7514
    @luckysantillan7514 Рік тому

    the jump on my game is not working hahah
    even one jump not working hahah

    • @bendux
      @bendux  Рік тому

      Would you like to show me your code on Discord?

    • @luckysantillan7514
      @luckysantillan7514 Рік тому

      @@bendux yes why not just send you discord link

    • @bendux
      @bendux  Рік тому

      @@luckysantillan7514 There is a link in the description.

  • @iojmx3387
    @iojmx3387 Рік тому +1

    nothing is clear . dislike

  • @loukmankoh1544
    @loukmankoh1544 Рік тому +1

    why i copy it and paste and hit play i got more than +999 eror with the same eror
    is UnassignedReferenceException: The variable animator of pm has not been assigned.
    You probably need to assign the animator variable of the pm script in the inspector.
    UnityEngine.Animator.SetFloat (System.String name, System.Single value) (at :0)

    • @bendux
      @bendux  Рік тому

      You don't need the animator for double jumping.

    • @loukmankoh1544
      @loukmankoh1544 Рік тому

      @@bendux yh it took me 2 hours to fix it and its fine

    • @bendux
      @bendux  Рік тому +1

      @@loukmankoh1544 I'm glad you were able to fix it.

    • @loukmankoh1544
      @loukmankoh1544 Рік тому

      @@bendux thx man

  • @ckjax3428
    @ckjax3428 Рік тому

    I ran into a prob can I dm u in discord?

    • @bendux
      @bendux  Рік тому +1

      Of course!

    • @ckjax3428
      @ckjax3428 Рік тому

      @@bendux I DM u yesterday!