Unity2d .velocity dash speed

Hey Guys!

I am trying to make my character dash like in the game Celeste when you press X. I tried with iTween and it worked by setting the Rigidbody to kinematic on keyDown and setting back to dynamic after 1 second (for example). However it didn’t work with collisions as it just entered inside collisions or went trough them. I tried onCollisionEnter2D already but that didn’t work exactly as expected (simply stop iTween on collision).

So i did it with rigidbody2d.velocity, it works but I would like it to happen faster. For example:

If i set the velocity to 10, it dashes fast but also far away, I would simply like it to move fast but not too far.

Any ideas how to achieve that? Here is my function:

void DashFunction(float dashSpeedX, float dashSpeedY, float Time)
    		myAnim.SetBool("doubleJump", !(isGrounded));
    		player.gravityScale = 0;
    		player.velocity = new Vector2(dashSpeedX, dashSpeedY);
    		canMove = false;
    		canDash = false;

Hey, sorry for digging up the old thread.
I‘m currently having the exact same problem an was wondering whether you found any solution? @MattChowski

maybe…set your collision detection on your rigidbody to continuous? might help, worth a shot.