diff --git a/travail_de_groupe/jeu_appren_par_renfo/src/player.c b/travail_de_groupe/jeu_appren_par_renfo/src/player.c index df2097511af0fa15f9f9cff620e6ec3632fda4ef..c980c88015017ab3319c4c30de79b2acf63024b0 100644 --- a/travail_de_groupe/jeu_appren_par_renfo/src/player.c +++ b/travail_de_groupe/jeu_appren_par_renfo/src/player.c @@ -99,7 +99,7 @@ void hitBall() ball.y = player.y; ball.z = player.h;*/ ball.angle = player.angle; - ball.speed = HIT_FORCE; + ball.speed = 2 * HIT_FORCE; ball.z = player.h; ball.isHit = 1; } diff --git a/travail_de_groupe/jeu_appren_par_renfo/src/render.c b/travail_de_groupe/jeu_appren_par_renfo/src/render.c index 80155a61dda1965ec0274c955cfa6386ff3fe783..01f6e3c7b3db8db62a361a83567411c0ff62e275 100644 --- a/travail_de_groupe/jeu_appren_par_renfo/src/render.c +++ b/travail_de_groupe/jeu_appren_par_renfo/src/render.c @@ -746,7 +746,7 @@ void drawBall() rect.x = screenDimension.w / 2 + (screenDimension.w * tan(ballAngle - player.angle)) * sqrt(3) * 0.5; rect.w = (ballWidth * screenDimension.w) / (ballDistance / BLOCK_SIZE); rect.h = (ballHeight * screenDimension.h) / (ballDistance / BLOCK_SIZE); - rect.y = (3 * screenDimension.h / 4 + player.viewAngle) - rect.h / 5 - 1.5 * tan(ballViewAngle) * ballDistance; + rect.y = (3 * screenDimension.h / 4 + player.viewAngle) - sqrt(3) * tan(ballViewAngle) * ballDistance; //printf("%d %d %d %d\n", rect.x, rect.y, rect.w, rect.h); destRect.x = 0;