Hi,
So I have been trying to create a slide / dash feature like they have in for example Mega man 3 for NES. When Mega man slides in that he comes to a complete stop when the sliding is done. (Unless the player keep running forward or dash again as he of course then till run or just do another dash, you can see that in the GIF I have added.)
I wonder how I could do this?
I have tried to give the player an force impulse, but even when I just give the player an impulse the player still slows down slowly and does not come to a complete stop. I have also tried giving the player velocity and such, but I got nothing to work. So if anyone know how to do this I would love the help.
Dropbox to the GIF: Dropbox - Error - Simplify your life
My current code that have not worked.
private void Slide()
{
this.gameObject.GetComponent<Rigidbody2D>().AddForce(new Vector2(5.0f, 0), ForceMode2D.Impulse);
clPlayerBase.GetSet_plMovement = PlayerMovement.SLIDE;
}