How To Dash In Unity

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Learn how to add dashing 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
    The Thought of You by TrackTribe

КОМЕНТАРІ • 463

  • @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!

  • @AkiDevelops
    @AkiDevelops 8 місяців тому +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! :)

    • @AkiDevelops
      @AkiDevelops 8 місяців тому +2

      also u deserve a lot more subs

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

    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.

  • @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

  • @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!

  • @MugStudios2024
    @MugStudios2024 Місяць тому +1

    These simple tutorials have been a lifesaver! THANK YOU!

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

    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.

  • @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 Рік тому

      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?

  • @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. :)

  • @kinopiko01
    @kinopiko01 3 місяці тому

    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

  • @HarleyKitson
    @HarleyKitson 9 місяців тому +2

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

  • @pyxelgamer
    @pyxelgamer 2 роки тому +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  2 роки тому +3

      I actually use AutoHotkey to avoid mistakes. Thank you!

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

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

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

      @@pyxelgamer Haha, yes!

  • @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

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

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

  • @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!

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

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

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

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

  • @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 ;) !

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

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

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

    thankss

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

    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

  • @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

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

    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!

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

    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  Рік тому

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

  • @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

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

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

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

    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!

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

      @@bendux ok!

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

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

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

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

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

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

  • @YourDoinGoodLad
    @YourDoinGoodLad 4 місяці тому

    you have the best tutorials for unity

  • @xxzz195
    @xxzz195 4 місяці тому

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

  • @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.

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

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

  • @borishofficial
    @borishofficial 3 місяці тому

    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

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

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

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

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

  • @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

  • @AxXis--
    @AxXis-- 2 роки тому

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

  • @artZs-chaos
    @artZs-chaos Рік тому +2

    anybody know how to make the player look the other way with a different flip method.

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

      How do you flip your player?

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

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

  • @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 UA-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  9 місяців тому

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

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

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

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

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

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

    2:00 what do i do if my character moves up,down,right and left??

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

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

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

    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.

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

    It's so simple thank you very much 😁

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

    you content is focused and neat! subbed!

  • @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!

  • @alexanderthegreat4817
    @alexanderthegreat4817 2 місяці тому

    Hi my character sometimes dashes into objects and gets stuck, im using your movement with unity input system tutorial and this dash tutorial, any ideas on whats gone wrong?

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

    Thank you bendux. The video helped me so much.

  • @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!

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

    I had a problem where my player only could've dashed in one direction (right), but my friend and I found a solution, here is my IEnumerator solution:
    private IEnumerator Dash()
    {
    canDash = false;
    isDashing = true;
    float originalGravity = rb.gravityScale;
    rb.gravityScale = 0f;
    if (rb.velocity.x > 0)
    {
    rb.velocity = new Vector2(transform.localScale.x * dashingPower, 0f);
    }
    else if (rb.velocity.x < 0)
    {
    rb.velocity = new Vector2(transform.localScale.x * dashingPower * -1, 0f);
    }
    yield return new WaitForSeconds(dashingTime);
    rb.gravityScale = originalGravity;
    isDashing = false;
    yield return new WaitForSeconds(dashingCooldown);
    canDash = true;
    }

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

      I'm glad you were able to fix it. Thank you for sharing your solution!

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

    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 Рік тому

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

  • @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 =)

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

    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  2 роки тому

      The answer to your question goes beyond the scope of a UA-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

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

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

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

    Great and understandable video! Great job bendux

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

    This was very helpful man!

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

    I love these tutorials

  • @mcredbunny5542
    @mcredbunny5542 8 місяців тому

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

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

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

  • @espoachan
    @espoachan 2 місяці тому

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

  • @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.

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

    BROTHER the dash is really slow for my player when i raise the dash power i make it longer not faster also the tail is under the player how i can fix this

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

      Would you like to show me your code on Discord?

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

    What about 3D Dash? Because 3D didnt have a gravityScale...

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

    Thanks, it looks awesome!

  • @hoangtruong318
    @hoangtruong318 3 місяці тому

    I have a problem. That's when I dash, my character slides until it touches an obstacle. How to stop the character from slipping anymore. Thank you

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

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

    • @hoangtruong318
      @hoangtruong318 3 місяці тому

      @@bendux ohh thank you, i fixed this

  • @rastythecrab3773
    @rastythecrab3773 5 місяців тому

    Hello, i followed your tutorial but when i tried to jump and dash my character just keeps floating until the end of the screen without faling down, can you help me with this ? Tysm!

    • @rastythecrab3773
      @rastythecrab3773 5 місяців тому

      nvm i forgot to move the trail renderer and now i got, thanks for the tutorial !

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

    pls do more vids because they help VERY MUCH

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

    Hello thank you very much for this tutorial really is very good! I have a question ! how can I make the dash work every 5 seconds? since every time I press the button makes the dash, thank you very much for your time!

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

      Increase the dashing cooldown at the top of the script.

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

      @@bendux hey i have one question. So the script works and i did the same as you and yeah trail shows up and all that but we don't actually dash. Like when we press shift it just goes in the speed i was already before dashing. Do you know how to fix this?

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

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

  • @le-mon
    @le-mon Рік тому

    Very helpful, thank you, subbed

  • @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?

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

    Complete beginner here, but I noticed that the player can dash while not moving. Here's my fix in case anyone else is struggling with this.
    put this inside the Update method
    canDash = false;
    if (Input.GetAxisRaw("Horizontal") == 1 || Input.GetAxisRaw("Horizontal") == -1)
    {
    canDash = true;
    }
    Flip();
    Hope this helps!

  • @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!

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

    Help, my cube can only dash to the left! Can you give me some instructions so my cube can flip?

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

      Would you like to show me your code on Discord?

  • @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!

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

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

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

    I am adding a Speedpad to my game, would this work but instead of pressing left shift key

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

    Nice job, it works perfectly except one thing :
    Player dashes as expected but trail doesn't show up if the tiles back have an order in Layer > 0, whereas my player has an order in layer at 5
    Don't know how to correct this

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

      issue fixed : trail renderer has an order in layer parameter. Give it the desired value and all it works
      Anyway, thanks for all your vids, helped me a lot ;)

  • @noodles4s892
    @noodles4s892 Місяць тому

    thank you very much👍

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

    GOD Tier Tutorial!

  • @lucasp.3578
    @lucasp.3578 Рік тому

    Amazing tutorial, the only problem I have is that my dash only works on one direction, could someone help me find out why?

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

      Would you like to show me your code on Discord?

  • @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?

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

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

  • @C4M3R0N03
    @C4M3R0N03 5 місяців тому

    Thank you for the tutorial, but my dash only works when moving to the right direction but not the left direction. What can I do to enable both directions in Visual Studio?

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

      How do you flip your player?

    • @C4M3R0N03
      @C4M3R0N03 5 місяців тому

      @@bendux I’ve copied the “private void Flip()” from the video but I think the game doesn’t know where it’s actually facing to flip.
      Is it possible to make something similar but with “is moving” instead of “is facing?”

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

      @@C4M3R0N03 You probably forgot to call the Flip method in the Update method.

    • @C4M3R0N03
      @C4M3R0N03 5 місяців тому

      With the part under…?
      private void Update()
      Flip();

    • @bendux
      @bendux  4 місяці тому

      @@C4M3R0N03 Yes!

  • @ma-yn4my
    @ma-yn4my 11 місяців тому

    Thanks for the video bro :D
    Someone why if I stop the dash trail does not disapear? :c
    If I continue moving disapear but so slowly. Thanks in advance.

    • @ma-yn4my
      @ma-yn4my 11 місяців тому

      Neverming haha I just activate "Apply ACTIVE color space" option xD

  • @amaanmujeeb7863
    @amaanmujeeb7863 5 місяців тому

    U r truly underrated man❤❤

  • @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.

  • @ketsueki血液
    @ketsueki血液 Рік тому

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

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

    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  Рік тому

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

  • @Egcyber7
    @Egcyber7 5 місяців тому

    I have a problem when i change the dash power nothing happens it doesn't want to be increased

    • @bendux
      @bendux  3 місяці тому

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

    • @Egcyber7
      @Egcyber7 3 місяці тому

      @@bendux i fixed it

  • @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.

  • @jellybob999
    @jellybob999 Місяць тому

    1:58 i use a differant flipping method/ so what do i do?

    • @bendux
      @bendux  Місяць тому

      It depends on how you flip your player.

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

    can someone help me it says 'Assets\Scripts\PlayerMovement.cs(59,13): error CS0246: The type or namespace name 'IEnumerator' could not be found (are you missing a using directive or an assembly reference?)' can anyone help
    btw great tut

  • @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 UA-cam comment, but I'd still like to help you. Join our Discord server, and let's solve your problem together!

  • @MentalDisorder11
    @MentalDisorder11 6 місяців тому

    hey a little advice please. error CS0246: The type or namespace name 'IEnumelator' could not be found (are you missing a using directive or an assembly reference?)
    help pls

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

      IEnumerator

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

    Unity say that "IEnumerator" doesn't exists. How can I fix it?

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

      using System.Collections;

  • @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!

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

    it wasnt working for me in my retro fps style game but i fixed it by just putting MoveSpeed = 15; then moveSpeed = 5; after DashingTime

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

      I'm glad you were able to fix it. Thank you for sharing your solution!

  • @user-ck4qp1jn7q
    @user-ck4qp1jn7q 4 місяці тому

    my player kind of just stop a bit and the trail appears he doesnt get boosted forward, can anyone help?