I'm currently implimenting a Dash action for my player and this is what I have so far. In the pastebin is my movement handling, along with both parts to my dash. Assume all variables are valid and working.
I at first tried using rigidBody.velocity = new Vector2(transform.localScale.x * dashSpeed, 0f); and it didn't work because I'm not using localScale to flip the player sprite. so I tried using .AddForce(i forgot but velocity.x * dashSpeed essentially) and it worked, but I want the player to be able to dash from a standstill, which this doesn't allow. What could I do here to give a consistent speed no matter what the state of the player is