- Home /
Simple Walking/Running Script
I just now got started with Unity, and script is killing me. I'm trying to find a simple script that where I can assign a "Run" button. I'm aware of the FPSWalker, but it includes a bunch of unnecessary things I don't want. Can anybody help me out here?
Answer by Muuskii · Sep 24, 2012 at 10:26 PM
Take a look at Input Manager. What you can do is setup a series of keyBinds that you access by calling:
InputManager.GetKey( keyBindName );
The cool thing is that it doesn't matter what the actual key that it's set to check for, and you can let the player change it anytime they want.
I'm working on updates for it that make it easier to make multiplayer games and AI scripts that control actors that are also player controllable.
If you don't need some of the features offered; Turn them off or delete the files associated with them.
Hope this has helped.
Thanks.
Your answer
Follow this Question
Related Questions
Movement in my terrain ? 2 Answers
Why can't I jump and run at the same time? c# 1 Answer
Character Movement and Jumping Script? 4 Answers
Some wierd problem. 1 Answer
Player walks to the right? 1 Answer