# How do I change the player's acceleration?

For my project, I want my player (basically just a ship) to only control the acceleration, not the speed directly (e.g. the player holds W and the ship accelerates up to a certain speed, holds S to slow down the then go into reverse, etc.). How could I do this? You can’t change acceleration in Blueprints directly, so I’m stuck.

Player movement actually already works based on acceleration, not speed directly. If you click on your charactermovement component in the blueprint editor (charactermovement.h, I think?) you can lower the acceleration values so that you more slowly accelerate to the max speed. I think they are set to 2048 u/s^2 by default

alternativelY you can use a forward force. depending on your body mass (automatically calculated from the collider volume and density) the resulting accelleration will be
A = F/m

just add some step to the force for every W and deduct it for every S…

I just went with the line of thought from Pheesh, and rigged up a simple Int variable to keep track of my “speed” and apply this as the scale to movement input every tick (that works fine for keeping steady speeds and such). I’ve noticed, however, that the acceleration only works properly when increasing my speed. Basically, whenever I shift gears up, per se, acceleration works over time and makes it logically slowly get faster. However, whenever I slow down, it takes place almost instantly. No slower shift over time, just poof, you’re stopped. My player’s max speed is 300, and the max acceleration is 75. Pictures are below of my basic speed stuff, so if you can find the error, please say so.

Hey guys, I followed loony123’s approach and it worked well. Any way I can increase the gear float by holding down an input? Rather than just pressing it once?