Skip to content
Snippets Groups Projects
Commit b8d6b634 authored by antoinemeyer5's avatar antoinemeyer5
Browse files

Merge branch 'render' of github.com:maberet/ProjetZZ1 into render

parents 36b3c6c1 24e0e8a2
No related branches found
No related tags found
No related merge requests found
......@@ -88,7 +88,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;
}
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment