Kajetan Johannes Hammerle 2 years ago
parent
commit
c33c5ffd9d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Game.cpp

+ 1 - 1
Game.cpp

@@ -59,7 +59,7 @@ static void addForce(const Vector2& force) {
 static void addMovement() {
     physicsToggle = physicsToggle ^ Controller::start.wasReleased();
     float movement = Controller::right.isDown() - Controller::left.isDown();
-    float actualSpeed = SPEED * (1.0f - steepness * onGround);
+    float actualSpeed = SPEED * (1.0f - std::abs(steepness) * onGround);
     if(physicsToggle) {
         addForce(Vector2(actualSpeed, 0.0f) * movement);
     } else {