Skip to content

Commit

Permalink
Changed acceleration limits
Browse files Browse the repository at this point in the history
  • Loading branch information
JohsLoje committed May 16, 2018
1 parent 7711b6b commit 9de4968
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flappy_main_game/scripts/flappy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 9de4968

Please sign in to comment.