- Home /
FPS Controller Minimum Movement Increasing
Does anyone know how to make the minimum moved distance higher when the button is pressed? Kind of like "min move distance" in CC but every time the button is pressed it moves that distance without having to hold the movement button before it actually takes the step.
When I tap the forward button my character controller either stands still or waits a moment for the button to be held down then moves the "min move distance" if its more than 0 (say 0.07)
Instead of waiting for the button to be held down, I'd like to just immediately move the CC as soon as the button is pressed,if the button is tapped i'd like the "min move distance" to be fulfilled without having to hold the button down.
It is a hard thing to explain but it's in all the latest games, and without it the CC feels sluggish and slow. Does anyone know how to achieve this effect? A simple guide or info would be helpful not asking for anyone to write my code. :)
Could you post the input / movement code you currently have? It might go a long way towards helping explain what you mean.
FPSController http://pastebin.com/Gw9iAvAR
Thanks. If it makes it any easier, there is a game called warmerise online. If you were to go into it and tap the forward button while you are playing it would be easier to understand what I was trying to explain.
Wow. There is a lot of code there. Is that really all in one file?
As far as I can tell, line 490:
if(Input.GetAxis("Vertical") > 0.1f && inputRun && canRun && !onLadder && Walking)
Is the only place you are grabbing input, is that correct? If so, have you tried playing with the 0.1f value there? Or the deadzone in the input options? Is this keyboard input or joystick?
Answer by Freznosis · Sep 26, 2014 at 10:45 PM
Hats off to you Habitablaba!
Changing the deadzone and the sensitivity on the input manager gave the desired effect. Thank's again. :)
For the controller just changing the sensitivity worked perfect also, no problem with the deadzone (changing it on pc gave a more accurate feel though, experiment).
Your answer
Follow this Question
Related Questions
Multiplayer updates are really slow 0 Answers
Low framerate on physics initialization. 0 Answers
Frame rate drops when replaying level 0 Answers
knowing maximum lenght a player can reach 0 Answers
Decrease distance between 2 objects 3 Answers