Blog · 2026-11-10
I have an issue with Stepping on gas and no increase in speed
Stefan Bogdanescu
Founder & Senior Architect
Diagnosing "Stepping on Gas" Without Speed Increase in Game Physics
This specific behavior—a sudden spike to maximum RPM accompanied by loud engine noise, yet zero acceleration—is a classic symptom of a decoupling between the throttle input logic and the vehicle's physics constraints. When you describe the gauge maxing out while the car sits still, it suggests the engine simulation is running at full load, but the drivetrain or friction model is preventing any forward movement.
In most game engines, whether Unity, Unreal, or a custom implementation, acceleration is calculated by applying torque to the wheels and then resolving that force against ground friction, air resistance, and vehicle mass. The symptoms you are seeing point to one of three specific failure modes: an infinite throttle input bug, a physics constraint collision, or a logic error where the wheel rotation is being forcibly locked.
First, consider how your throttle value is being passed from the input system to the engine controller. If this happens "rarely," it often indicates a race condition or a floating-point precision issue rather than a consistent logic flaw. In languages like C# for Unity or JavaScript with Three.js, inputs are sometimes sampled once per frame but applied in a way that doesn't account for frame rate drops.
// Potential culprit: Input state not clamped before reaching the engine
public float GetThrottle() {
// If this returns 1.0f even when the user presses slightly less,
// and your engine torque curve isn't scaled, you'll hit max RPM instantly.
return Input.GetAxis("Vertical");
}
// Better approach: Clamp and smooth to prevent sudden spikes
public float GetSafeThrottle() {
float raw = Input.GetAxis("Vertical");
if (raw > 1f) raw = 1f; // Hard clamp
if (raw < -1f) raw = -1f;
// Optional: Smooth transition to avoid "jitter" causing the spike
return Mathf.Lerp(lastThrottle, raw, Time.deltaTime * smoothFactor);
}
If your code correctly clamps the input, look at the physics resolution step. The most common cause for high RPM but zero speed is that the vehicle's wheels are colliding with an invisible obstacle or a trigger zone that sets the velocity to zero every frame, effectively creating a "soft lock." Imagine the engine screaming while the wheels spin in place; if your collision detection resolves position immediately after applying force, and the ground plane is slightly off due to floating-point errors, the car might be micro-colliding with itself or the terrain.
Another possibility involves the difference between angular velocity of the wheels and linear velocity of the chassis. If you are manually setting angularVelocity on the wheel colliders but failing to apply an equal and opposite force to the rigidbody, the engine will rev up, but Newton's third law won't result in forward motion because there is no reaction force applied to the car body.
# Pseudo-code for correct torque application
def update_vehicle_physics():
# Apply torque to wheels based on throttle
wheel_torque = max_throttle * engine_torque_curve(rpm)
# CRITICAL: Apply equal and opposite force to the main rigidbody
# without this, wheels spin in place if friction is low or locked
chassis_force = -wheel_torque / wheel_radius
physics_rigidbody.apply_impulse(chassis_force_vector)
You mentioned it happens "rarely." This timing aspect often correlates with when the vehicle transitions from a static to a dynamic state. If your vehicle starts in a kinematic mode (for AI pathfinding or initial spawning) and switches to dynamic physics, there can be a brief window where torque is applied but velocity resolution hasn't initialized yet. Ensure that rigidbody.isKinematic is set to false only after the initial pose is locked down by a character controller or similar system.
Finally, verify your friction settings in the physics engine. If the wheel colliders have zero friction or an excessively high slip value configured in their material properties, they will spin without translating force into linear movement. Check if the material assigned to your wheels has dynamicFriction set appropriately for the surface type you are driving on.
If none of these code-level checks resolve the issue, isolate the problem by removing all collision components from the vehicle except the chassis and adding a single wheel collider in mid-air. If the engine still revs without moving, the fault lies entirely within your throttle-to-torque math. Once the core loop is stable, re-introduce terrain and collisions incrementally to find the specific trigger for this rare glitch.