Fixed physics
This commit is contained in:
parent
57c42d74e9
commit
f84a5bf850
1 changed files with 2 additions and 2 deletions
4
index.js
4
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue