- Home /
Question by
$$anonymous$$ · Apr 01, 2013 at 11:13 PM ·
sprint
How To Add A Sprint Function?
Hello there, if you don't know, i am developing an indie game like amnesia or penumbra. But Is there a sprint mechanic or script that someone would be kind enough to share? thank you :)
Comment
Answer by Loius · Apr 01, 2013 at 11:41 PM
kind of simple, no?
speed = transform.forward * Time.deltaTime;
if ( Input.GetKeyDown( sprintKey ) ) speed *= runSpeed; else speed*= walkSpeed;
Your answer

Follow this Question
Related Questions
A node in a childnode? 1 Answer
what's wrong with this script? 2 Answers
I need help instantiateing a bullet 0 Answers
Decreasing footstep length when key pressed 1 Answer
Make Script Disable 3 Answers