How To Dash In Unity

preview_player
Показать описание
Learn how to add dashing to your game in Unity!

*SOCIAL*

*SUPPORT*

*MUSIC*
The Thought of You by TrackTribe
Рекомендации по теме
Комментарии
Автор

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!

alecraigan
Автор

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.

srivikas
Автор

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
Автор

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

cornmoss
Автор

These simple tutorials have been a lifesaver! THANK YOU!

MugStudios
Автор

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!

chrishoben
Автор

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

Khud
Автор

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

HarleyKitson
Автор

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

progCan
Автор

For a top-down game, to dash towards the mouse pointer I used
mousePos =
mousePos.z = 0f;
rb.velocity = dashingSpeed * Time.deltaTime * new Vector2(mousePos.x - playerUnit.transform.position.x, mousePos.y -

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.

Aterbrarum
Автор

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

amaantrieshard
Автор

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

scorpiusjones
Автор

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

SpivSpirit
Автор

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.

pyxelgamer
Автор

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

OzunaGameplays
Автор

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!

shamangrayson
Автор

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 * dashingPower, 0f);
print(rb.velocity);
tr.emitting = true;
yield return new WaitForSeconds(dashingTime);
tr.emitting = true;
rb.gravityScale = originalGravity;
isDashing = false;
yield return new
canDash = true;
}

Hope this helps

kinopiko
Автор

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

computer_head
Автор

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

gamesbyspinola
Автор

thankss <3 short and straight to the point video about a single game mechanic, very nice format

oknaa