- Home /
How to let player adjust speed of FPC movement
Is there a way the player can control the First Person Controller so that he can increase its speed at will or revert to a slower default? I know how to change the default speed; just wondering if I could allow the player to move faster if he wants to (like, by pressing the up key plus another key). Thanks!
Answer by red 2 · May 09, 2011 at 06:46 PM
sure you can. either you use the "run button" way, and simply let the script check if the run button is pressed. if yes, it uses run speed, if no, it uses walk speed. the other way im thinking of is a smooth speed control, like you used to have in the old splinter cell games (controlled by mouse wheel in that case). you could simply check for a button to be pressed and raise the speed value by 1.
Those both sound great, except I'm new to coding and don't know the wording to use on the Character $$anonymous$$otor script. Any short lines of code you can suggest? Otherwise, I'll just try to look around some more. Thanks for the suggestions, though.
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
How to access Blend Tree "speed" in Mecanim from C# 0 Answers
Problem with time !! help me 1 Answer
Slow camera move speed? 2 Answers