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 :slight_smile:

1 Answer

1

kind of simple, no?

speed = transform.forward * Time.deltaTime;
if ( Input.GetKeyDown( sprintKey ) ) speed *= runSpeed; else speed*= walkSpeed;

http://lmgtfy.com/?q=unity+sprint