From f84a5bf850e1e06b5bc7c0eafb8092d2ab5ab4ca Mon Sep 17 00:00:00 2001 From: Simon Date: Wed, 25 Jan 2017 18:58:05 +0100 Subject: [PATCH] Fixed physics --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index c5a1a67..8737ea0 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ var Configuration = { ball_speed : 15, ball_owner : Math.round(Math.random()) + 1, ball_maxAngle : 5*Math.PI/12, - wincount : 3 + wincount : 5 } /** Parameters **/ @@ -291,7 +291,7 @@ function calculateBallPosition(){ console.log(intersect); console.log('###########################'); ball_VX = ball_speed*Math.cos(intersect*ball_maxAngle); - ball_VY = ball_speed*Math.sin(intersect*ball_maxAngle); + ball_VY = -ball_speed*Math.sin(intersect*ball_maxAngle); } }