How To Dash In Unity

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 มี.ค. 2022
  • Learn how to add dashing to your game in Unity!
    Source code: gist.github.com/bendux/aa8f58...
    SOCIAL
    Discord: / discord
    itch.io: bendux.itch.io/
    Twitter: / bendux_studios
    SUPPORT
    Buy Me a Coffee: www.buymeacoffee.com/bendux
    MUSIC
    The Thought of You by TrackTribe
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 447

  • @HarleyKitson
    @HarleyKitson 6 หลายเดือนก่อน +2

    Super useful video! Got it done in no time with no bugs! Really helped me out on my coursework, thanks! :)

  • @alecraigan4568
    @alecraigan4568 2 ปีที่แล้ว +19

    3:41 , come on now no need for that I'm flustered.... your tutorials are amazing and you did a fantastic job explaining the process to us newcomers into the gaming development community!

  • @srivikas1834
    @srivikas1834 2 ปีที่แล้ว +20

    This is such an easy way to add Dash. I didn't even want to try using dash but after I saw this video, I was able to implement it into my game in 5 mins. Thank you so much. Wish there was a lot more content from you.

  • @SpivSpirit
    @SpivSpirit ปีที่แล้ว

    Thanks, it helped a lot. I just love how straight to the point it was.

  • @MyNameIsARandomDude82-ms7kn
    @MyNameIsARandomDude82-ms7kn 6 หลายเดือนก่อน +3

    I wasn't even thinking of adding Dash to my game, but after seeing this tutorial I quickly added it in next to no time. Thanks for the help! :)

  • @chrishoben8270
    @chrishoben8270 ปีที่แล้ว +6

    Thank you so much!
    We were using Brackey's tutorial on 2D movement (and his script), but when it came to stuff like Dashing it was almost impossible to implement. Thank you!

  • @cornmoss638
    @cornmoss638 ปีที่แล้ว +6

    Dude thank you so much, I decided to remove the lines of code that collect the gravity info which makes the player dash straight and also used the box collider I used to see if I am on the ground to determine if I could dash. This allows my dashes to still have gravity effects and to only be performed on the ground, so if the player rolls off the edge they will still fall.
    Thanks so much mate

  • @oknaa8526
    @oknaa8526 2 ปีที่แล้ว

    thankss

  • @OzunaGameplays
    @OzunaGameplays ปีที่แล้ว +1

    This is the most useful video about dashing, thank you so much!

  • @Khud0
    @Khud0 2 ปีที่แล้ว +3

    Woah, I've never seen an IEnumerator used this way before! Oh, all the possibilities this opens!
    Thank you very much, your short videos are perfect for my procrastination periods. :)

  • @growingupaqueen2398
    @growingupaqueen2398 ปีที่แล้ว

    1000 sub dude keep going your videos are short and direct to the point the code is easy to understand Thank you for being here so glad i found ur channel

  • @shamangrayson8143
    @shamangrayson8143 ปีที่แล้ว

    Works perfectly! I had done my player turning a little differently so I just made if statements for isFacingRight true or false to dictate the different directions. Thank you so much!

  • @Bierbr3zel
    @Bierbr3zel 2 ปีที่แล้ว

    Great video! Can't wait for your next video to be published!!

  • @AxXis--
    @AxXis-- 2 ปีที่แล้ว

    Thank you so much!! I love this short simple and amazing tutorial!!

  • @gamesbyspinola
    @gamesbyspinola 2 ปีที่แล้ว +1

    really clean set up for the dash ability really similar to the one I have but
    what I really liked was the trail feature. I didn´t knew about that really cool ;) !

  • @OrabiMix
    @OrabiMix ปีที่แล้ว

    Always best tutorials in those underrated channels.. new sub ❤️❤️

  • @gracetang1025
    @gracetang1025 2 ปีที่แล้ว

    Thank you for making dash so easy! I have implement dash into my game!

  • @ChildRaper123
    @ChildRaper123 ปีที่แล้ว

    Thank you so much for the help! It's very helpful and short it's super worth subscribing.

  • @amaantrieshard
    @amaantrieshard ปีที่แล้ว +1

    Thanks so much dude, I'm a complete noob to this and you made it look easy. I appreciate you.

  • @computer_head8653
    @computer_head8653 2 ปีที่แล้ว +1

    Dude you're so funny and your tutorials are awesome.

  • @YourDoinGoodLad
    @YourDoinGoodLad 2 หลายเดือนก่อน

    you have the best tutorials for unity

  • @cyberducc
    @cyberducc 2 ปีที่แล้ว +1

    you content is focused and neat! subbed!

  • @DevNoob
    @DevNoob 2 ปีที่แล้ว

    Great and understandable video! Great job bendux

  • @playanoapps
    @playanoapps ปีที่แล้ว

    This was very helpful man!

  • @SebMakesGames
    @SebMakesGames ปีที่แล้ว

    I don't usually comment on videos, but this realy helped me out! Thanks.

  • @XxADONExX
    @XxADONExX ปีที่แล้ว

    you don't know much this helped me. thank you so much!

  • @BILGI_PASA
    @BILGI_PASA ปีที่แล้ว

    Thank you bendux. The video helped me so much.

  • @vextor_daddy187
    @vextor_daddy187 ปีที่แล้ว

    Thank You mans this helped a lot and now my cube can dash.

  • @U2BE4ALL
    @U2BE4ALL ปีที่แล้ว

    Thanks, it looks awesome!

  • @apesyb9812
    @apesyb9812 2 ปีที่แล้ว

    Hey bendux, i am making a game for uni project. never used unity before, you have helped me alot. thanks

  • @scorpiusjones5436
    @scorpiusjones5436 ปีที่แล้ว

    This is pretty aweome. Just throwing this out there, but helping out in the comments section and not on a Discord server can potientally help so many more people down the road imo

  • @raxel-plus-one
    @raxel-plus-one ปีที่แล้ว

    Thank you so much this was so helpful, I'm now beginning to program dashing up and down

    • @bendux
      @bendux  ปีที่แล้ว

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

    • @raxel-plus-one
      @raxel-plus-one ปีที่แล้ว

      @@bendux ok!

  • @BigVideoSmallClip
    @BigVideoSmallClip ปีที่แล้ว

    I love these tutorials

  • @darkknight2825
    @darkknight2825 ปีที่แล้ว +1

    It's so simple thank you very much 😁

  • @le-mon
    @le-mon ปีที่แล้ว

    Very helpful, thank you, subbed

  • @derkleinetim45
    @derkleinetim45 ปีที่แล้ว

    Nice Tutorial and I tried it out directly bc i looked for a simple dash so long. I had a little Problem, when i dash my player gets boosted extremly far sometimes. I edited the code a little so i coul use my own Player Code (so it has stuff like Coins). But still a very good and simple tutorial, you definitly deserve more views!

  • @xxzz195
    @xxzz195 2 หลายเดือนก่อน

    Thanks a lot. I don't even know Dash code can be so easy.

  • @LeftyDev1337
    @LeftyDev1337 2 ปีที่แล้ว

    thanks man! Keep up the good work and take my follow

  • @Skitozzz
    @Skitozzz ปีที่แล้ว

    Very easy to follow thanks so much here is a sub 👍

  • @sldeverything431
    @sldeverything431 ปีที่แล้ว

    thanks for the knowledge

  • @amaanmujeeb7863
    @amaanmujeeb7863 3 หลายเดือนก่อน

    U r truly underrated man❤❤

  • @tristanp763
    @tristanp763 ปีที่แล้ว

    Thank you so much!

  • @nightfox_69
    @nightfox_69 ปีที่แล้ว

    GOD Tier Tutorial!

  • @amine8689
    @amine8689 2 หลายเดือนก่อน

    hey man !
    thanks a lot !!!

  • @animationsbelike
    @animationsbelike 2 ปีที่แล้ว

    Thank you! :D

  • @lukenorfleet
    @lukenorfleet ปีที่แล้ว

    this is so helpul thanks you so much

  • @malindupraboda1918
    @malindupraboda1918 หลายเดือนก่อน

    Thank you :)

  • @TheNamelessTO
    @TheNamelessTO 2 ปีที่แล้ว +3

    Awesome video! Short and to the point!
    I had an idea on how I want to do a dash function but mine wasn't as nice as yours. =)
    I hope you'll make more videos =)

  • @lifestylebyalfi5854
    @lifestylebyalfi5854 3 หลายเดือนก่อน

    Thanks Bro

  • @Aterbrarum
    @Aterbrarum ปีที่แล้ว +1

    For a top-down game, to dash towards the mouse pointer I used
    mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
    mousePos.z = 0f;
    rb.velocity = dashingSpeed * Time.deltaTime * new Vector2(mousePos.x - playerUnit.transform.position.x, mousePos.y - playerUnit.transform.position.y).normalized;
    The rest is pretty much the same. I removed the parts relating to gravity and I had to start the couroutine from FixedUpdate(), not Update(), otherwise I got inconsistent dash speed. Useful tutorial.

    • @bendux
      @bendux  ปีที่แล้ว +2

      Thank you for sharing! As far as I know, you don't need to multiply by Time.deltaTime if you set the velocity as shown. Maybe I'm wrong, but that's how they do it in the documentation.

  • @DeltaReviews420
    @DeltaReviews420 11 หลายเดือนก่อน

    if your dashing in the wrong direction try setting IsFacingRight to true in the player movement code, worked for me.

  • @frashfries
    @frashfries 7 หลายเดือนก่อน

    ur genius and thanks so much

  • @pyxelgamer
    @pyxelgamer ปีที่แล้ว +2

    You never mess up while typing. It's so smooth that I have the weird feeling that you make an AutoHotkey script or something in advance. Anyways, good video.

    • @bendux
      @bendux  ปีที่แล้ว +3

      I actually use AutoHotkey to avoid mistakes. Thank you!

    • @pyxelgamer
      @pyxelgamer ปีที่แล้ว

      @@bendux Ok, you put that much effort? I'm suscribing.

    • @bendux
      @bendux  ปีที่แล้ว

      @@pyxelgamer Haha, yes!

  • @kinopiko01
    @kinopiko01 หลายเดือนก่อน

    Thanks for the tutorial.
    Some of you may have a problem with the dashing as that it only allows you to dash in one direction. To fix this:
    Change flip's private void to this:
    private void Flip()
    {
    if (isFacingRight && horizontal < 0f || !isFacingRight && horizontal > 0f)
    {
    Vector3 localScale = transform.localScale;
    isFacingRight = !isFacingRight;
    if(isFacingRight) localScale.x = 1f;
    else localScale.x = -1f;
    transform.localScale = localScale;
    }
    }
    And the IEnumenaratorDash to this:
    private IEnumerator Dash()
    {
    canDash = false;
    isDashing = true;
    float originalGravity = rb.gravityScale;
    rb.gravityScale = 0f;
    rb.velocity = new Vector2(transform.localScale.x * dashingPower, 0f);
    print(rb.velocity);
    tr.emitting = true;
    yield return new WaitForSeconds(dashingTime);
    tr.emitting = true;
    rb.gravityScale = originalGravity;
    isDashing = false;
    yield return new WaitForSeconds(dashingCooldown);
    canDash = true;
    }
    Hope this helps

  • @Mojzer_
    @Mojzer_ 2 ปีที่แล้ว

    pls do more vids because they help VERY MUCH

  • @progCan
    @progCan ปีที่แล้ว +7

    thanks for the tutorial, i made a more advanced version of it that includes vertical dahsing (both up and down) and diagonal dashing in any direction. i did it by replacing the vector(2) you set the rb.velocity with: new Vector2(Input.GetAxisRaw("Horizontal"), Input.GetAxisRaw("Vertical")) * DashForce

    • @bendux
      @bendux  ปีที่แล้ว +1

      Thank you for sharing!

    • @progCan
      @progCan ปีที่แล้ว

      @@bendux you are welcome

    • @bastienpetit8124
      @bastienpetit8124 11 หลายเดือนก่อน

      Hello, I tested your system but after a vertical dash, the player continues to climb, keeping the momentum of the dash until falling back with gravity. How can I fix this?

  • @kyleandersen2388
    @kyleandersen2388 2 ปีที่แล้ว

    Nice!

  • @NotTolik708
    @NotTolik708 ปีที่แล้ว

    Genius video!!!!!!!!

  • @CodedGamer972
    @CodedGamer972 ปีที่แล้ว

    i would say increese the gravity when the player is done dashing or if the player is in air or not grounded such as jump or falling

  • @matsu4721
    @matsu4721 2 ปีที่แล้ว +16

    Thanks for awesome tutorial! Can you do how to wall jump in unity?

    • @GlitchSound
      @GlitchSound 2 ปีที่แล้ว +1

      Yes! That would be awesome

    • @bendux
      @bendux  2 ปีที่แล้ว +4

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

    • @mcgwynardplayz5407
      @mcgwynardplayz5407 ปีที่แล้ว

      @@bendux yo is out?? I just watched this.. hehe

  • @leefy_sf
    @leefy_sf 2 ปีที่แล้ว +1

    this is very straight forward with a short intro, I love it! Also quick question, I would like to limit the number of dashes the player can have mid-air and when stepping on the floor it refreshes, thanks!

    • @bendux
      @bendux  2 ปีที่แล้ว +7

      The answer to your question goes beyond the scope of a TH-cam comment, but I'd still like to help you. Join our Discord server, and let's solve your problem together!

    • @projectmuirear396
      @projectmuirear396 ปีที่แล้ว +1

      Hi! I had a similar want, I used this fix, maybe it will work for you, in the private void Update()
      I used the following lines of code,
      if (IsGrounded())
      {
      canDash = true;
      }
      else
      {
      canDash = false;
      }
      simple but it works!

    • @bendux
      @bendux  7 หลายเดือนก่อน

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

    • @bendux
      @bendux  7 หลายเดือนก่อน

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

    • @bendux
      @bendux  7 หลายเดือนก่อน

      @@noobdev6464 rb.velocity = new Vector2(transform.localScale.x * dashingPower, 0f);

  • @heroysake
    @heroysake ปีที่แล้ว

    Si quelqu'un a ajouté, comme moi, le wall jump avant ce tutoriel, le "dashing power", pour augmenter la vitesse en dash, n'est pas appliqué. Pour ça, j'ai du ajouter "&& !isDashing" au "FixedUpdate" :
    if (!isWallJumping && !isDashing)
    rb.velocity = new Vector2(horizontal * speed, rb.velocity.y);
    Ainsi les deux fonctionnent !
    Thank you for the videos and curious to see the future tutorials :D

  • @niuka8688
    @niuka8688 ปีที่แล้ว

    thanks :]

  • @surai262
    @surai262 2 ปีที่แล้ว

    Great vid! can you also do a wall jump and crouching tutorial? thanks! also subscribed

    • @bendux
      @bendux  2 ปีที่แล้ว +2

      Wall jumping and crouching are both on my list for future videos.

  • @vassago635
    @vassago635 ปีที่แล้ว

    Hi bendux.
    First of all, congrat for your effort. I know manage a youtube channel requires time and will, so thank you.
    I miss something about dashing in your video: usually, dash is used to dodge traps or enemies. How should I do to avoid collisions through the dash moment? If I disable the player collider he can walk through walls.

    • @bendux
      @bendux  ปีที่แล้ว

      The answer to your question goes beyond the scope of a TH-cam comment, but I'd still like to help you. Join our Discord server, and let's solve your problem together!

  • @zendaki4601
    @zendaki4601 ปีที่แล้ว

    you really need to be more popular then you are your videos are truly amazing you deserve to have your pillows cold and your gas prices lowered

  • @funforgingstudio4690
    @funforgingstudio4690 2 ปีที่แล้ว +2

    Hi! Great tutorial as always! Is it possible to make level system in Unity?) like you rich the end of a level and then you appears in new one. It would be pleasure to see it from you!)

    • @bendux
      @bendux  2 ปีที่แล้ว +2

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

  • @borishofficial
    @borishofficial หลายเดือนก่อน

    i know it's been a pretty long time since this was posted, but is there a way to cancel the dash mid-way through, via a jump or key input? this tutorial was really useful for someone learning the basics but i'm wondering if another method would be needed

  • @usamabinmuzaffar692
    @usamabinmuzaffar692 11 หลายเดือนก่อน

    Do note one thing though. Constantly starting a coroutine can compound the computation cost of your game. Make sure that you stop the coroutine after it is used.

    • @bendux
      @bendux  11 หลายเดือนก่อน

      In this case, it's not necessary to stop the coroutine manually.

  • @Nin10doLetsPlay
    @Nin10doLetsPlay 2 ปีที่แล้ว +3

    Hey I have a Question. How do I make it so that the Player can also dash diagonally?

    • @bendux
      @bendux  2 ปีที่แล้ว +1

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

  • @mcredbunny5542
    @mcredbunny5542 6 หลายเดือนก่อน

    Thanks for the video!! Can you explain how to put dash in input system?

    • @bendux
      @bendux  6 หลายเดือนก่อน +1

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

  • @Davearmstrong42
    @Davearmstrong42 2 ปีที่แล้ว

    Great vid! So easy too implement. How do you prefer to deal with wall collisions mid dash?

    • @bendux
      @bendux  2 ปีที่แล้ว

      What do you mean?

    • @Davearmstrong42
      @Davearmstrong42 2 ปีที่แล้ว

      @@bendux if you dash in mid air... then hit a wall half way through the dash... is it handled normally or do you have to consider a wall collision mid dash vs a jump. Im new to game dev... Does the dash action just stop at a collision or do you handle that differently during a dash?

    • @bendux
      @bendux  2 ปีที่แล้ว +1

      @@Davearmstrong42 Unity automatically takes care of wall collisions.

  • @rdxdrx4686
    @rdxdrx4686 2 ปีที่แล้ว

    I tried to make dashing in untiy allot but I couldn't add a cooldown because I'm new to codeing
    Thank you and congratulations on 1k

    • @bendux
      @bendux  2 ปีที่แล้ว

      Thank you!

  • @gideon5261
    @gideon5261 10 หลายเดือนก่อน

    Hello, this was a great easy to understand video. I only have one question and that is how to add a sound effect without you just flying forever until you die and then play the effect.

    • @gideon5261
      @gideon5261 10 หลายเดือนก่อน

      no wories, figured it out after playing around with the placement of dashSoundEffect.Play(); in my code

  • @blackantz5293
    @blackantz5293 5 หลายเดือนก่อน

    Nice tutorial, I was thinking of making it so you can dash through enemies without losing velocity, how would i Impliment that?

  • @briosh.mp4
    @briosh.mp4 ปีที่แล้ว

    Ty for this tutorial, and can u make more tutorial because the last video was 2 months ago 😅

    • @bendux
      @bendux  ปีที่แล้ว +1

      I want to upload a new tutorial soon.

    • @briosh.mp4
      @briosh.mp4 ปีที่แล้ว

      @@bendux ok cool 😁

  • @TheTehnigga
    @TheTehnigga ปีที่แล้ว

    Cool :D

  • @3bdulrahman_xp
    @3bdulrahman_xp 2 ปีที่แล้ว

    Thank you for making dash so easy🔥🔥
    and i have a problem why when i dashing, the gravity scale does not back to 0

    • @bendux
      @bendux  2 ปีที่แล้ว +1

      Would you like to show me your code on Discord?

  • @gamedevguy54
    @gamedevguy54 10 หลายเดือนก่อน

    Can you show us how to add a sound effect to the dash please?

  • @trulybarr5341
    @trulybarr5341 11 หลายเดือนก่อน +1

    Do you know how to make a character Dash forward on a 3D Side Scroller?

  • @Rolim2332
    @Rolim2332 2 ปีที่แล้ว

    Nice tutorial! can you make a tutorial on how to make a menu for unity 2d?

    • @bendux
      @bendux  2 ปีที่แล้ว

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

  • @thevoidconqueror
    @thevoidconqueror ปีที่แล้ว

    hey could you make an video combining the wall jump/slide and this vid cause i want to incorporate both but adding both codes to the single script is difficult with some of the differences between them as well as world settings for the gravity for these different projects cause i think im having issues with it

    • @bendux
      @bendux  ปีที่แล้ว

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

  • @EnemyOTS
    @EnemyOTS 8 หลายเดือนก่อน

    hmm for some reason I only dash to the right and gravityScale never changes!
    Edit: I've fixed it since I'm using this flip function:-
    private void Flip()
    {
    facingRight = !facingRight;
    Vector3 Scaler = transform.localScale;
    Scaler.x *= -1;
    transform.localScale = Scaler;
    }
    I added:-
    if(facingRight) rb.velocity = new Vector2(transform.position.x * dashingForce, 0f);
    if (!facingRight) rb.velocity = new Vector2(-transform.position.x * dashingForce, 0f);
    so my character will dash depending on facing right or lift variable, the full function would look like this:-
    private IEnumerator Dash()
    {
    isDashAllowed = false;
    isDashing = true;
    float originalGravityScale = rb.gravityScale;
    rb.gravityScale = 0f;
    if(facingRight) rb.velocity = new Vector2(transform.position.x * dashingForce, 0f);
    if (!facingRight) rb.velocity = new Vector2(-transform.position.x * dashingForce, 0f);
    yield return new WaitForSeconds(dashingTime);
    rb.gravityScale = originalGravityScale;
    isDashing = false;
    yield return new WaitForSeconds(dashingCD);
    isDashAllowed = true;
    }
    and for the gravity scale I have no idea why its not changing at all, I'm still debugging.
    Edit 2: i couldn't figure it out so i had to play around the issue using the dash animation. I had to add keys that change the GravityScale and disables the attacks scripts while dashing and resetting everything at the last keyframe.

  • @gabreese_
    @gabreese_ ปีที่แล้ว

    Hey Hey, i used this in my game and changed it up a bit. Instead of using a transform i just set the velocity to a value. However i do have an issue. Could you think of any way to add jump functionality mid dash while keeping the current x velocity?

    • @bendux
      @bendux  ปีที่แล้ว +1

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

  • @Kazu173_
    @Kazu173_ ปีที่แล้ว

    is there any way you could help me use this to creating something like a wavedash? i want to dash diagonally towards the ground and use that momentum to slide and carry that speed

    • @Kazu173_
      @Kazu173_ ปีที่แล้ว

      i also want it to gradually decrease the speed instead of instantly stopping

  • @Cobing72
    @Cobing72 2 ปีที่แล้ว

    what if I had a top down shooter game what I could change with that code. and thanks you so much with this awesome tutorial

    • @bendux
      @bendux  2 ปีที่แล้ว

      The answer to your question goes beyond the scope of a TH-cam comment, but I'd still like to help you. Join our Discord server, and let's solve your problem together!

  • @seventwo7582
    @seventwo7582 ปีที่แล้ว

    Hi, I'm from Brazil, I have difficulty with English.
    Your tutorial is wonderful! But I have a doubt: Every time I use the dash, the camera doesn't follow the character immediately, but only after the dash animation ends. How do I make the camera follow the character during dash animation?

    • @bendux
      @bendux  ปีที่แล้ว

      Would you like to show me your code on Discord?

  • @notanonymous4415
    @notanonymous4415 8 หลายเดือนก่อน

    Is there any way you could make it so you can jump in the middle of the dash tweaking with your speed and jump force sort of like a dash jump? I'm a begginer and i'm kinda clueless about this lol

  • @GMCorner
    @GMCorner ปีที่แล้ว

    Can i multiply the y axis of the rgbd2d with dashing power to dash diagonally ? This only allow us to dash horizontally

    • @bendux
      @bendux  ปีที่แล้ว

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

  • @GuyWithChainsaw
    @GuyWithChainsaw 17 วันที่ผ่านมา

    Will it work in unity 3d? With 3d movement?

  • @Leodev138
    @Leodev138 14 วันที่ผ่านมา

    i am using the new input system. how can i implement the dash using this new system?

  • @lumiinaty8276
    @lumiinaty8276 10 หลายเดือนก่อน

    Hey, good video, do you know how to do it on a topdown game to dash in the direction the player is moving (the y and x axis ) ?
    Thanks for the help

    • @bendux
      @bendux  10 หลายเดือนก่อน

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

  • @cnvanims
    @cnvanims ปีที่แล้ว

    idk if you still answer questions, but i wanted to make it so that i could dash upwards and downwards. I am new in both unity and c# so i'm kinda confused how to implement that, can you please help me?

    • @bendux
      @bendux  ปีที่แล้ว

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

  • @chuthi244
    @chuthi244 20 วันที่ผ่านมา

    thank your video!

  • @vextor_daddy187
    @vextor_daddy187 ปีที่แล้ว

    I wanne know if it would be possible to add a stamina bar thats effected by the dashes, and if the stamina is depleted then cant dash, and stamina regen.

    • @bendux
      @bendux  ปีที่แล้ว

      The answer to your question goes beyond the scope of a TH-cam comment, but I'd still like to help you. Join our Discord server, and let's solve your problem together!

  • @slickityragnarthegreat3013
    @slickityragnarthegreat3013 ปีที่แล้ว

    Amazing Video! I just had one issue, where my sprite can only dash left. How can I fix this?

    • @bendux
      @bendux  ปีที่แล้ว

      Would you like to show me your code on Discord?

  • @dachigobeja8490
    @dachigobeja8490 2 ปีที่แล้ว +1

    Thanks for the tutorial man, but the problem I have is that the player's momentum doesn't reset afterwards so it keeps going forwards in that dashing speed

    • @bendux
      @bendux  2 ปีที่แล้ว +1

      Would you like to show me your code on Discord?

    • @dachigobeja8490
      @dachigobeja8490 2 ปีที่แล้ว +2

      @@bendux actually no, I figured it out myself by manually setting player velocity to zero when the dash ended, I just forgot to edit the comment lol
      Thanks anyway

    • @bendux
      @bendux  2 ปีที่แล้ว +2

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

  • @Arcann_bhp
    @Arcann_bhp 11 หลายเดือนก่อน

    i don't understand the if (is dashing)
    return;
    how does it disable ur movement while dashing so you can only move the direction you started ur dash?

    • @bendux
      @bendux  11 หลายเดือนก่อน

      learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/jump-statements#the-return-statement

  • @venxm243
    @venxm243 ปีที่แล้ว

    This tutorial is awesome - but I have one issue. I use a different code for my player movement, and this method doesn't seem to work with it at all. I'm not sure why, because there is nothing about Dash in my script. I'm wondering if its because there is no animation attached to the player?
    Not sure how to fix this :(

    • @bendux
      @bendux  ปีที่แล้ว

      Would you like to show me your code on Discord?

  • @isaakfleshman1486
    @isaakfleshman1486 6 หลายเดือนก่อน

    I was wondering if there is a way to change the button to work when a controller button is clicked

    • @bendux
      @bendux  4 หลายเดือนก่อน

      There are several ways to do that, but I would recommend taking a look at Unity's new input system.