How To Wall Slide & Wall Jump In Unity

Поделиться
HTML-код
  • Опубликовано: 2 фев 2025
  • Learn how to add wall sliding and wall jumping to your game in Unity!
    Source code: gist.github.co...
    SOCIAL
    Discord: / discord
    itch.io: bendux.itch.io/
    Twitter: / bendux_studios
    SUPPORT
    Buy Me a Coffee: www.buymeacoff...
    MUSIC
    Get Back by Silent Partner
    Midnight Special by E's Jammy Jams

Комментарии • 339

  • @SuperSleepyBeepy
    @SuperSleepyBeepy Год назад +37

    Dude you have literally help me build out the base of my character movement. You deserve WAY more subscribers than you currently have

  • @fillowskyy
    @fillowskyy Год назад +7

    Found your channel today, it's gold. I wanted to make my own platformer, and I saw that you have the tutorials I'm looking for - coyote time, dash etc. Thank you!

  • @ДмитрийШаповалов-р5с
    @ДмитрийШаповалов-р5с 2 года назад +27

    A couple more videos and I can make celeste with my own hands. Thank you, friend!)

    • @UnsupervisedIdiotOfficial
      @UnsupervisedIdiotOfficial Год назад +3

      I know I'm not bendux, but..good on you!Wish you luck!

    • @Baj-7
      @Baj-7 6 месяцев назад +2

      im actualy making a celeste clone with this code lol

  • @luckyowl859
    @luckyowl859 2 года назад +8

    I hope you continue to make videos! Your tutorials are amazing and very easy to follow!

  • @mcovar2033
    @mcovar2033 Год назад

    A year after posting and this is still super helpful ( especially for people just getting back into game development! ) Thanks for making this :)

  • @hpgg6232
    @hpgg6232 Год назад +3

    Stumbled across this tutorial while making a game for Game Jam... Once i saw your code structure i doubted everything i knew after 6 months of self-learning. I basiclly deleted my code, wrote down same as you use, tweaked a little bit to work as i initially planned and OH MY GOD now everything is working smoothly, code is readable and has any kind of structure to it. Great tutorial !

    • @engineergaming3830
      @engineergaming3830 9 месяцев назад +1

      yeah honestly self-learning is good but it's alvays good to watch a tutorial once in a while dx

  • @kheloras4786
    @kheloras4786 3 месяца назад

    What a simple and clear tutorial. Thanks for this ! It helps me a lot on my project !

  • @piespluto402
    @piespluto402 2 года назад +6

    Great video! Could you do a tutorial about spawning entities (like enemies) outside of players vision for your next video? It would greatly help me.
    Also, abolute respect for replying to new comments on your videos! You are one of the best unity tutorial youtubers and it's criminal you don't have more subscribers

    • @bendux
      @bendux  2 года назад +2

      I've added it to my list. Thank you for the suggestion!

    • @piespluto402
      @piespluto402 2 года назад +1

      @@bendux Thanks for a quick reply! I love when creators are in touch with ther viewers

  • @GentleMonkey
    @GentleMonkey 2 года назад +2

    Dank deinen Videos hab ich einfach das Grundgerüst für ein coolen 2D platformer/runner in nur 7 std geschaffen. Du machst die Videos und Scripts so simpel und easy zu verstehen... Eif der King aller Programmierer.
    Vorschlag für ein neues Video (Zwar nicht wirklich in deinem Stil aber ich hab trzdm Hoffnung) : Wie man das Grundgerüst für ein RTS 2D Spiel wie Supremacy macht.

    • @bendux
      @bendux  2 года назад +1

      I've added it to my list. Thank you for the suggestion!

    • @GentleMonkey
      @GentleMonkey 2 года назад +1

      @@bendux You are amazing!

  • @thomasjames1067
    @thomasjames1067 Год назад +2

    Clean code, detailed explanation, great demo! All in all awesome video!

  • @iLikeSnowFoxes
    @iLikeSnowFoxes Год назад +2

    GRAPPLING HOOK NEXT PLZ also great content you get straight to the point and are clear about how these functions work also please keep uploading

  • @itsdonix
    @itsdonix 2 года назад

    Straight To The Point. You're The Best 2D Game Tutorial Maker On RUclips. Keep It Up! Ur Aweasome

  • @RadishMalan
    @RadishMalan 5 месяцев назад

    At first some stuff may fail, but once you start reading and remembering what you do and see in this tutorials you'll see success at some point

  • @DavrK
    @DavrK 2 года назад

    Just found out about your channel and im in love with it already. Really hope you make more vids in the future

  • @chrono9503
    @chrono9503 2 года назад +7

    I have a few ideas for videos
    -How to make a level barrier that teleports you back if you fall. Seems simple, just a modified Teleporter Script
    - How to make a 2D simple gun
    - Simple 2D enemy
    - How to have pickups

  • @n1pster3
    @n1pster3 Год назад

    Great videos, I've been using unity since 2020 and took a year off of it. Just getting back into it, trying to refresh my memory on everything. This was a great tutorial, thanks! I would love it if you could make a video tying in all the movement tricks, such as double jumping, wall jumping, wall sliding, etc. into one neat script. As well as setting up animations for those various actions. Thanks!

    • @bendux
      @bendux  10 месяцев назад

      I definitely want to upload a character controller with all the features of my tutorials in the future. Thank you!

  • @Vladek16
    @Vladek16 Год назад

    thanks for those tutorial man, I've followed the 2D movement, dash and this one, and it works perfectly :D !

  • @davibarbosa7283
    @davibarbosa7283 Год назад

    Your tutorial are incredible, it's helping me so much developing my game, thank you! Keep it up! :)

  • @glowraptor5228
    @glowraptor5228 5 месяцев назад +3

    is there any way to add a kick off the wall so that if you hold the directional input into the wall, you go upwards and away from the wall

  • @PitiITNet
    @PitiITNet 2 года назад +2

    Little fun tutorial! Great job :)

  • @jakeingtonh
    @jakeingtonh 18 дней назад

    Been a while since the video came out but I was curious how to implement double jumping after performing the wall jump. Anyways awesome tutorials!

  • @bucksygaming
    @bucksygaming Год назад +2

    If u guys are stick in to the wall try creating a 2d physics material and make friction 0 then add it to the material in collider or rigid body component. great tutorial btw thanks.

    • @Hardcore0
      @Hardcore0 Год назад

      how to do with 3d character?

    • @bucksygaming
      @bucksygaming Год назад

      @@Hardcore0 sry bro I don't know about 3d. May be it's the same not sure tho.

    • @rayyandarbashi7166
      @rayyandarbashi7166 Год назад

      Thank you so much! I was scrambling with the code to see if I missed something, and was left confused when everything was the exact same as the video.
      You've saved me from countless hours of agony haha, thanks.

    • @TenmoWatcher
      @TenmoWatcher 8 месяцев назад

      you are THE GOAT!!!! I was spending a lot of time trying to fix this issue, like a very lot time. I completely forgot there was a friction option, you just made my day sir, thanks o7

    • @hockaj4845
      @hockaj4845 3 месяца назад

      @@bucksygaming BROOO THANKS YOUR SO CLUTCHHH

  • @mav1nd_238
    @mav1nd_238 2 года назад +1

    Your tutorials are awesome! Big thanks for them!

  • @monarchdrumandbass8700
    @monarchdrumandbass8700 2 года назад

    How do you not have more subs! Incredible videos!

  • @g.nath0
    @g.nath0 Год назад

    Thanks! your helped my thesis work. I wish you success too!!

  • @coswic9128
    @coswic9128 2 года назад +3

    i love u so much, thank u, u have single handed made my game 100x times better with the movement tutorials

  • @winter2021inmemory
    @winter2021inmemory 2 года назад

    tnx bro, u made my day with this vid, i will try it tomorrow

  • @silyax4213
    @silyax4213 13 дней назад

    Thanks a lot this really helped me out!

  • @turtledude5749
    @turtledude5749 2 года назад +2

    Good vid really useful your vids are so good

  • @lakshya2204
    @lakshya2204 5 месяцев назад

    the matf.clam in sliding is causing the lagging issue so if you don't want it just use constant value

  • @ElWuthrich
    @ElWuthrich Год назад +1

    Acabo de encontrar tu canal, espero que sigas haciendo tutoriales, ya me suscribí !!!!

  • @Kerem_MertGakadatil
    @Kerem_MertGakadatil 2 года назад +1

    When you upload new unity tut?
    And
    How to make animated characters from Tuts you uploaded

    • @bendux
      @bendux  2 года назад +1

      I want to upload a new tutorial soon, and there will definitely be a video about animations in the future.

  • @trungnghianguyen2993
    @trungnghianguyen2993 2 года назад

    Your videos are very useful with me. Thank you very much.

  • @meltedistaken
    @meltedistaken Год назад +2

    Hey, I was wondering if you could make a tutorial on how to make movement with acceleration. My movement feels very stiff and I want to have it to where if I start holding "D," it takes some time to reach maximum speed. Or when I turn around and instantly start moving the other direction, I want it to take some time.

    • @bendux
      @bendux  Год назад +2

      Try Input.GetAxis instead of Input.GetAxisRaw.

    • @meltedistaken
      @meltedistaken Год назад

      Thank you!

  • @Blamethemsm
    @Blamethemsm Год назад

    I wish you would combine all of these into one where you can double jump, dash, wall jump, and wall slide.

    • @bendux
      @bendux  10 месяцев назад

      I definitely want to upload a character controller with all the features of my tutorials in the future.

  • @blockboyeytu7824
    @blockboyeytu7824 2 года назад +1

    Can you make a tutorial for adding animations to these?

    • @bendux
      @bendux  2 года назад +1

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

  • @RickydeCamargo
    @RickydeCamargo Год назад +4

    Hey man, thanks for this series of unity 2d videos. They are very helpful to us beginners. I have a question:
    In order to have a better and clean coding do you recommend to us to build only a gigantec script with every new hability ? Or is less complicated to create a script for every new skill ? I mean, a script just for walk, another one just for jump, etc etc. And we can manage easily on unity ?
    Thank you.

    • @Bryannathestinkyfrog
      @Bryannathestinkyfrog Год назад

      I'm still learning myself but I thought I could give my answer to your question.
      I use unity and when I create a script for my player's movement, I usually call it playerMovement and put all player movement inside that script. That includes basic movements using WASD and any jumping for the game. I haven't made a game yet with special abilities for the player but depending on the ability, you could put it in playerMovement or into another script. Something like double jump or dash, I'd probably put into my playerMovement script though.
      It isn't hard to manage as long as your code is clean and your variable names are easy to understand.
      I hope that helps if you haven't already come to a solution/answer 😊

  • @shork-c2l
    @shork-c2l Год назад +1

    ty it work but i cant dash now can u help?

    • @bendux
      @bendux  Год назад

      It probably has something to do with the order of execution in your script.

  • @Natycik
    @Natycik Год назад +2

    Tried your method, but it's not working because of colliders. Basicly, if the player is aganst a wall and "runs" into it, the player stops moving and doesn't fall (y velosity is 0). Your player object seems to not collide with objects in that way, I'm not sure what you did to prevent this.

    • @bendux
      @bendux  Год назад +3

      Create a Physics Material 2D, set the friction to zero, and add it to your player's Rigidbody 2D component.

  • @KIRya055-Miass
    @KIRya055-Miass Год назад

    You have good vids, I like them. And the code is good. Your content is useful to me, even though I am Russian, thank you.👍

  • @tah4mis
    @tah4mis 2 года назад

    Perfect! Thanks a lot bro!

  • @CATaclysmOg
    @CATaclysmOg 7 месяцев назад +1

    I tried your code and the wall slide doesn't work in my case I do not know what could be the issue. Also the wall jump will not apply the horizontal force away from the wall when wall jumping

    • @armandasaukscionis2558
      @armandasaukscionis2558 7 месяцев назад

      by any chance is it only on a wall that is to the right of the character?

    • @CATaclysmOg
      @CATaclysmOg 7 месяцев назад

      @@armandasaukscionis2558 both sides unfortunately

    • @bendux
      @bendux  6 месяцев назад +1

      Create a Physics Material 2D, set the friction to zero, and add it to your player's Rigidbody 2D component.

    • @CATaclysmOg
      @CATaclysmOg 6 месяцев назад

      @@bendux thanks but I already done that

    • @bendux
      @bendux  6 месяцев назад

      @@CATaclysmOg I advise you to compare your script with the source code in the description.

  • @bodacious617
    @bodacious617 2 года назад

    I love your videos so much!!!

  • @realdestroyer9516
    @realdestroyer9516 2 года назад +1

    Thanks brother it helped me out a lot .Can u please make a video abt enemy ai

    • @bendux
      @bendux  2 года назад

      I've added it to my list. Thank you for the suggestion!

  • @zynnonP
    @zynnonP 2 года назад +1

    Could you maybe make a tutorial on a top down dash? I've seen your platformer dasv but i can't seem to implement in vertically, could you maybe help me with that please?

    • @Coleslaw333
      @Coleslaw333 2 года назад +1

      You could use a bool and increase the move spped for a short amount of time like 0.2 seconds with an Enumerator like
      If(whatever key you want pressed & & candash)
      {
      StartCoroutine(Dash() ) ;
      Candash = false;
      }
      IEnumerator Dash()
      {
      Move speed = whatever. Make it high enough;
      Yield return new WaitForSeconds(0.25f);
      Movespeed = whatever it was before;
      Yield return new WaitForSeconds(however long) ;
      candash = true;
      }

    • @zynnonP
      @zynnonP 2 года назад +1

      @@Coleslaw333 i'll give it a shot later and let you know if it worked

    • @bendux
      @bendux  2 года назад

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

  • @greatvideos1665
    @greatvideos1665 2 года назад +1

    Good please create more unity videos

  • @Amber_CEO
    @Amber_CEO 2 года назад

    An idea:
    A way to tag an object as being able to be wall jump'd on

  • @The_Crucifix
    @The_Crucifix Год назад

    I get a very sharp jump, almost teleportation - what could be the reason?

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

    • @The_Crucifix
      @The_Crucifix Год назад

      ​@@bendux already, in help

  • @KatelynCollins225
    @KatelynCollins225 Год назад +1

    I'm pulling my hair out here, thanks to my terrible spaghetti code. I followed your tutorial(really great btw,) the best I could given my existing code, and whenever the wall jump duration runs out of time, the player just abruptly stops mid air and falls. Any idea on why this is happening? Thanks!

    • @bendux
      @bendux  Год назад +1

      What should happen instead?

    • @KatelynCollins225
      @KatelynCollins225 Год назад +1

      @@bendux the wall jump should have continued. I ended up completely rewriting the code, because it was a huge and terrible mess.

    • @bendux
      @bendux  Год назад

      @@KatelynCollins225 It's a good idea to refactor your code from time to time.

  • @naymod2717
    @naymod2717 2 года назад

    Thanks mang

  • @simonstechhacks
    @simonstechhacks Год назад

    I copied the source code and pasted the code into PlayerMovement and made wall thingy. I linked it to the player and everything but when i play if i jump at the wall it just noclips through. I changed the layer to wall for the walls. Help pls

    • @bendux
      @bendux  Год назад

      Do your walls have a Box Collider 2D component?

    • @simonstechhacks
      @simonstechhacks Год назад

      @@bendux Oops. yeah thanks i didnt have it

  • @wanhell9745
    @wanhell9745 2 года назад

    Thank you for your tutorials! They are amazing! Could you make a tutorial about slopes please?

    • @bendux
      @bendux  2 года назад +1

      I've added it to my list. Thank you for the suggestion!

  • @UnderArea51
    @UnderArea51 Год назад

    Mr.Bendux, how would you go about implementing roguelike - turn-based movements? The player moves - a monster moves?

  • @emilian_spielt300
    @emilian_spielt300 2 года назад +1

    The Double Jump and the walljump dont work together, i mean it work but i can jump infinite on the wall. any fixes?

    • @bendux
      @bendux  2 года назад

      Would you like to show me your code on Discord?

    • @emilian_spielt300
      @emilian_spielt300 2 года назад

      I fixed it! your tutorials are really nice

    • @bendux
      @bendux  2 года назад

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

    • @McDuffieCrew
      @McDuffieCrew 2 года назад +1

      @@emilian_spielt300 how did you fix it

  • @condorkus
    @condorkus Год назад

    Can you maybe show us how to do animations aswell? Your tutorials are super easy to follow

    • @bendux
      @bendux  Год назад +2

      There will definitely be a video about animations in the future. Thank you!

  • @alfiehine2931
    @alfiehine2931 2 года назад +1

    When I tested the sliding mechanic before implementing the jump, it worked perfectly. But after I coded the jumping the wall sliding stopped working for me, do you know of why this could be?

    • @bendux
      @bendux  2 года назад

      Would you like to show me your code on Discord?

  • @bobjoe132
    @bobjoe132 Год назад

    I love these tutorials, although i think it would be nice to learn what is happening, so i can replicate it on my own.

  • @ahmadbagheri5430
    @ahmadbagheri5430 7 месяцев назад

    Thanks for the video but one question ? did you use isWallJumping in any condition ? I cant see any.

    • @bendux
      @bendux  6 месяцев назад

      I even used it twice.

  • @neilaszemgulys6754
    @neilaszemgulys6754 Год назад

    Your tutorials are the best.
    But then I am wall sliding and i hold arrow key what makes my player face wall im sliding I can just spam space bar and he just slides upwards all the time sticked to the wall. Is there a way to fix that?

    • @bendux
      @bendux  Год назад +1

      Would you like to show me your code on Discord?

    • @neilaszemgulys6754
      @neilaszemgulys6754 Год назад

      @@bendux ok

    • @baptiste4171
      @baptiste4171 3 месяца назад

      @@neilaszemgulys6754 hey i have the same problem, what was the solution ?

  • @luccabobucca
    @luccabobucca 5 месяцев назад

    couldn't I just reuse the Ground Layer? Or would that cause complications down the line?

  • @michaelhill9
    @michaelhill9 Год назад

    Hey, I was able to combine your wall-jumping tutorial and you dash tutorial, and I need a way to make the same thing for player 2, since I need different parameters or something. Any way to fix that?

    • @bendux
      @bendux  Год назад

      What's the problem?

  • @YoungJayFlow
    @YoungJayFlow Год назад

    Hello, whenever I am sliding on the wall and I frequently press the jump button, I've noticed that the player character jumps vertically along the wall instead of performing the intended action.

    • @bendux
      @bendux  Год назад

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

  • @WheatTheG
    @WheatTheG 2 года назад +1

    how do i add animations to this script such as Jumping animation wall jumping and running

    • @bendux
      @bendux  2 года назад

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

  • @ongstudio5849
    @ongstudio5849 Год назад

    You.Are.Awsome!

  • @UnsupervisedIdiotOfficial
    @UnsupervisedIdiotOfficial Год назад

    Thx for the vid.
    I was just wondering, how does the "mathf.clamp" function work?

    • @UnsupervisedIdiotOfficial
      @UnsupervisedIdiotOfficial Год назад

      Like i mean...i know how it works and how to use it with transform.position, but not with rigidbody 😢

    • @UnsupervisedIdiotOfficial
      @UnsupervisedIdiotOfficial Год назад

      I can't find any lessons on it, only with the transform...

    • @bendux
      @bendux  Год назад

      docs.unity3d.com/ScriptReference/Mathf.Clamp.html

    • @UnsupervisedIdiotOfficial
      @UnsupervisedIdiotOfficial Год назад

      @@bendux thx, but it still doesn't really make sense...
      I don't get how ur using the clamp function in the vid, anyways thank you....

    • @bendux
      @bendux  Год назад

      @@UnsupervisedIdiotOfficial What's the problem?

  • @yttriun
    @yttriun 6 месяцев назад

    your tutorials are grat but i have managed to make you able to jump when you not on the ground do you have any idea what went wrong ?

    • @bendux
      @bendux  6 месяцев назад

      You probably set up the layers incorrectly.

    • @yttriun
      @yttriun 6 месяцев назад

      @@bendux thanks

  • @RedM21
    @RedM21 10 месяцев назад

    This is a great tutorial but for some reason whenever I try to Walljump my character just stickes to the wal for a little bit while in the air and dashing feels more like a jetpack now. Please help...

    • @howtogetthat4533
      @howtogetthat4533 10 месяцев назад

      if (Input.GetButtonDown("Jump") && wallJumpingCounter > 0f)
      {
      isWallJumping = true;
      rb.velocity = new Vector2(wallJumpingDirection * wallJumpingPower.x, wallJumpingPower.y);
      wallJumpingCounter = 0f;
      i think this line is your problem

  • @mrflopa3684
    @mrflopa3684 2 года назад

    Good Job !

  • @kuruttakao4363
    @kuruttakao4363 6 месяцев назад

    i have a question:
    why use Mathf.Clamp instead of just fixing it to -wallSlidingSpeed ?

    • @lakshya2204
      @lakshya2204 5 месяцев назад

      don't use it ,it cause the lagging issue while sliding so just use constant value

  • @Aadarsh-wv7xc
    @Aadarsh-wv7xc Год назад

    i came here after ur dashing tutorial vid (great tutorials btw) and i added walljump into it without touching any of the dash code... for some reason it completely breaks the dash and the walljump/slide just doesn't work whatsoever...
    pls help :(

    • @bendux
      @bendux  Год назад

      It's hard to tell what's going on without seeing your script.

    • @Aadarsh-wv7xc
      @Aadarsh-wv7xc Год назад

      @@bendux ill try to dm u the script the next time I open my pc... I am out of station rn...

    • @bendux
      @bendux  Год назад +1

      @@Aadarsh-wv7xc There is a link to our Discord server in the description.

    • @Aadarsh-wv7xc
      @Aadarsh-wv7xc Год назад

      K thx

  • @SalikShorov
    @SalikShorov Год назад

    Thank you for the video. For some reason my player starts to slide up when it’s on the top half of the wall and slides down when it’s on the bottom half. I don’t if anyone else is having the same issue.

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

  • @VoidSkull-Edits
    @VoidSkull-Edits 8 месяцев назад

    im new in unity and my dream is to make a platformer. it become reality. big thanks to you for making this short, Obviously, and fun tutorials. and here idea for tutorial: boss fight!!! and maybe make a playlist for this tutorials? its the best tutorials ive ever seen. please, keep doing this mythic tutorials for me, and for everyone else. i just found your channel a few hours ago. youtube, this chnnel need to get a big golden play button. please like this comment to make him see this!!!!!!!!

  • @meltedistaken
    @meltedistaken Год назад

    Hey, I was wondering how I could use acceleration and momentum with the wall jump, as it feels stiff. As soon as the wall jump ends, I can start moving the other direction without speeding up.

    • @bendux
      @bendux  Год назад

      Try Input.GetAxis instead of Input.GetAxisRaw.

  • @Just_Zeni
    @Just_Zeni 10 месяцев назад +1

    I don't know why but I did it exactly like in the video and it doesn't work. I try to solve it for 3 hours but it still doesn't work. Maybe it's a bug or something like that, do you have a solution?

    • @Just_Zeni
      @Just_Zeni 10 месяцев назад

      nvm i just was dumb

    • @officialtjlgamer
      @officialtjlgamer 10 месяцев назад

      @@Just_Zeni what was your issue?

  • @sunbob_
    @sunbob_ Год назад

    Great tutorials. Is there an easy way to have a certain animation while sliding down the wall until you hit the ground or jump?

    • @bendux
      @bendux  Год назад

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

  • @neilaszemgulys6754
    @neilaszemgulys6754 Год назад

    Hi how do i make wall jumping an power up.(When you start a game you dont have it but you can find it somewhere in the map and when you can wall jump permanently)

    • @bendux
      @bendux  Год назад

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

    • @neilaszemgulys6754
      @neilaszemgulys6754 Год назад

      @@bendux i am already joined

  • @Kazu173_
    @Kazu173_ Год назад

    for some reason when i wall jump while facing left i lose all momentum and drop to the ground

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

  • @HellhogGaming
    @HellhogGaming Год назад

    the problem with assigning the "wall" layer to the walls is that they will not count as ground if you stand on top of them and therefore you wont count as grounded when on top of a wall. this is no good if the wall is also part of the same object that is a floor.

  • @tylerhuff7394
    @tylerhuff7394 Год назад

    This code works great for vertical jumping up walls, but it doesn't seem to be pushing the player off the wall properly. If I have the player sliding down the right hand side of a wall and press jump without holding down a movement direction then they will occasionally get a small bit of movement before resetting their Rigidbody velocity.x back to 0.
    In this video are you actively pressing in the direction opposite the wall when you jump off? I think the problem is tied to update refreshing the velocity based on horizontal.

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

  • @nikomu7256
    @nikomu7256 2 года назад

    Great Tutorial!!!!!!!!!!!!!!

  • @Gasterious
    @Gasterious 2 месяца назад

    For some reason the player is sticking to the wall when it should be sliding. There isn't a problem with the wall jumping or anything else. It just sticks to the wall, I even turned the isWallSliding to public for a while so I could see if the sliding script is activating, but it didnť have a problem. Could anyone help me with this? Does it have something to do with friction? I'm a little lost.

    • @bendux
      @bendux  2 месяца назад

      Create a Physics Material 2D, set the friction to zero, and add it to your player's Rigidbody 2D component.

    • @Gasterious
      @Gasterious 2 месяца назад

      @@bendux Thanks that helped me a lot. I also watched some of your other tutorials and they are really good

  • @patriksdzenis6179
    @patriksdzenis6179 2 года назад

    You are the best!

  • @nixelz7455
    @nixelz7455 Год назад

    I do really think i understood the idea between all the code on this video, but my character seems to bounce to the other wall instead of waiting me to press the jump button again. In my project the gravity is lower so i had to change values from the wallJumpingPower variable in orther to make it organic. Why is he bouncing? Did i forget something important on the video? I already watched it 3 times. Thank You!

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

    • @sunhikpramanik2429
      @sunhikpramanik2429 Год назад

      @@bendux I also tried it and am facing the same problem that it is jumping twice instead of once. Any solution to that?

    • @bendux
      @bendux  Год назад

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

  • @scoop9551
    @scoop9551 Год назад

    there is one problem, if you go on top of an object with the layer Wall, it won't have the ground layer so everything checking for isGrounded will be bugged, any solutions for that please ?

  • @MaciejAnimacje
    @MaciejAnimacje 2 года назад +1

    do an animation tutorial

    • @bendux
      @bendux  2 года назад

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

    • @MaciejAnimacje
      @MaciejAnimacje 2 года назад

      @@bendux i have tried to do them for like 8 hours now 😅

  • @Rivaldix12
    @Rivaldix12 3 месяца назад

    When i type this line;
    if (isWalled() && !grounded() && xInput != 0f)
    it says "Non-invocable member 'PlayerMovement.grounded' cannot be used like a method." Can you please help :(

    • @brollerchannel819
      @brollerchannel819 16 дней назад

      it seems that "grounded" is not a method, its a variable (bool). Just delete brackets
      if (isWalled() && !grounded && xInput != 0f)

  • @Mathi5000
    @Mathi5000 9 месяцев назад

    i used the ground and wall layer as one layer. lets hope it doesnt break anything

  • @simonstechhacks
    @simonstechhacks Год назад

    Help my character launches much further than its supposed to on the wall jump

    • @bendux
      @bendux  Год назад

      Decrease the wallJumpingPower values at the top of the script.

    • @simonstechhacks
      @simonstechhacks Год назад

      @@bendux I tried lowering it but it ends up launching you at tripple the speed of the default walljumppower no matter how i change it

    • @bendux
      @bendux  Год назад

      @@simonstechhacks Would you like to show me your code on Discord?

  • @sillbisgaralandi9416
    @sillbisgaralandi9416 Год назад

    Can you make a tutorial for walking animation

    • @bendux
      @bendux  Год назад

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

  • @NatePlayzzzzz587
    @NatePlayzzzzz587 2 года назад

    Im confused
    When i create empty and play the ground and wall check doesnt stay on the player

    • @bendux
      @bendux  2 года назад

      The ground check and the wall check must be a child of the player.

  • @mrLilipoutios
    @mrLilipoutios 4 месяца назад

    I used it in my game and it worked perfectly fine. I turned off my pc and when i opened it again (3 hours later) all of a sudden it doesnt work. Why is that? Can anyone help me?

  • @noelshow9997
    @noelshow9997 2 года назад

    Very good video Thank u soo much :))

  • @hipsterelephant2660
    @hipsterelephant2660 2 года назад

    Thanks!

  • @cj.shot8616
    @cj.shot8616 8 месяцев назад

    thank you SOoooooooo much, How can I increase my character wall jump ?

    • @bendux
      @bendux  8 месяцев назад

      Increase the wallJumpingPower values at the top of the script.

  • @lanceychu9781
    @lanceychu9781 2 года назад

    hello, I encountered a problem with the flipping part of the character. It seems that when the walljump happens, my character for some reason looks left when moving to the right and vice versa. I followed your tutorials on the movement + this video. Would appreciate the help thanks :>

    • @bendux
      @bendux  2 года назад

      Would you like to show me your code on Discord?

    • @lazougre4229
      @lazougre4229 2 года назад

      your player could by rotated to the wrong direction from the beginning. you can flip it in unity by adjusting the scale on the X or do the same in the start method: void Start()
      {
      Vector3 theScale = transform.localScale;
      theScale.x *= -1;
      transform.localScale = theScale;
      }
      (Doing it in unity is better :) )

  • @GoodluckMosesmba
    @GoodluckMosesmba Год назад

    Pls help me fix, mine says that 😢 the wallLayer, wallCheck, and wallSliding is never assigned to and will always have its default value null

    • @bendux
      @bendux  Год назад

      You probably forgot to assign the variables in Unity.

  • @lazougre4229
    @lazougre4229 2 года назад

    I'm so sorry, I'm fliping my player by rotating it on the Y so what do i do when setting the WallJumpDirection ? Thnx

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

  • @volcanicau6604
    @volcanicau6604 Год назад

    when I jump off the wall the player continues to move any quick fix?

    • @bendux
      @bendux  Год назад

      Would you like to show me your code on Discord?

  • @CodeAikawa
    @CodeAikawa 11 месяцев назад

    There's a bug that randomly executes when I wall jump consecutively. My player suddenly can't move. It can only jump. I have my own code and I use the new input system. I wrote the code in a different way but it still functions the same.
    It's just, when I jump from wall to wall, and the wall slide suddenly gets cancelled (this happens because I use two different layers for the wall, one that you can't do a wall jump and one that you can) as I was saying, when the wall slide suddenly got cancelled after doing multiple wall jumps, I'll just fall to the ground and I can't move from that position.
    Edit: The issue became even more clear, the bug only happens when I was holding the horizontal input and the wall sliding was cancelled during that time. And when I fell back to the ground, I can't move unless I do another wall jump.

    • @bendux
      @bendux  11 месяцев назад

      It's hard to tell what's going on without seeing your script.

    • @CodeAikawa
      @CodeAikawa 11 месяцев назад

      @@bendux i realized that this bug only occurs when using the new input system. I can't explain it, it just happens.

    • @bendux
      @bendux  10 месяцев назад

      @@CodeAikawa Would you like to show me your code on Discord?

  • @kampfkiwi0828
    @kampfkiwi0828 Год назад

    can you combine all the videos now?

    • @bendux
      @bendux  Год назад

      I definitely want to upload a character controller with all the features of my tutorials in the future.