How to make GetAxis double tap dash/ reset dash speed upon release GetKeyUp??

I have the dashing mechanic in my game working but the problem is that its not the key I want to use. Also I’m quite stuck on how to make a script telling the player if key is released after dash reset it back to its default state…

Also how would i make sure to keep dash speed by holding left or right after double tapping for dash?

A big thanks in advance!! *First time using the forums [93309-playermove.txt|93309]

Hi,

I see you’re using GetKeyDown with a Keycode, which is fine, unless you want to use a mouse move or joystick direction.

You could use Keycode.LeftArrow and Keycode.RightArrow.

Also, GetKeyUp will be triggered when the key is released. You can use it to reset the dash speed.

@UnityCoach Thanks for the help I managed to get the script to work just fine! If possible could you take a look @ my new post I’m having alot of trouble with that particular script atm.