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 link text
Answer by UnityCoach · May 03, 2017 at 05:48 AM
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.
Answer by ProjectEL · May 08, 2017 at 03:36 AM
@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.
Your answer

Follow this Question
Related Questions
Bullet Not moving Forward with speed 1 Answer
Rope & Character controller ? 0 Answers
Player still move left&right in MenuUI 0 Answers
How to stop a sphere that is using GetAxis from moving? (Roll-A-Ball Tutorial) 0 Answers
Unity physics Help Implementing Real Life Physics in Jumping System C# 2 Answers