From 9de4968d556d747adb4d0d39fabdebc90d763fb3 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 16 May 2018 18:21:26 +0200 Subject: [PATCH] Changed acceleration limits --- flappy_main_game/scripts/flappy.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flappy_main_game/scripts/flappy.py b/flappy_main_game/scripts/flappy.py index 2967b63..522f079 100755 --- a/flappy_main_game/scripts/flappy.py +++ b/flappy_main_game/scripts/flappy.py @@ -25,8 +25,8 @@ # scale pixels to meters SCALING = 0.01 -ACCXLIMIT = 0.1 / SCALING -ACCYLIMIT = 2.0 / SCALING +ACCXLIMIT = 3.0 +ACCYLIMIT = 35.0 VELLIMIT = 10.0 / (SCALING*FPS) PIPESPACING = 192 @@ -573,8 +573,8 @@ def controlCallback(data): global playerAccX global playerAccY - playerAccX = limitAcceleration(-data.x/SCALING,ACCXLIMIT)/(FPS*FPS) - playerAccY = limitAcceleration(-data.y/SCALING,ACCYLIMIT)/(FPS*FPS) + playerAccX = limitAcceleration(-data.x,ACCXLIMIT)/(FPS*FPS*SCALING) + playerAccY = limitAcceleration(-data.y,ACCYLIMIT)/(FPS*FPS*SCALING) #print(playerAccY) def limitAcceleration(accUser,limit):