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

meilleur centrage de la portee du seau d'eau

parent 16d829e4
Branches
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ void manageMovement(){
int selectStateHover(){
int stateHover = 0;
int distance = sqrt(pow(abs(mousePosition.x - player.x/CELLSIZE), 2)+pow(abs(mousePosition.y - player.y/CELLSIZE), 2));
int distance = sqrt(pow(abs(mousePosition.x - ((player.x+player.w/2))/CELLSIZE), 2)+pow(abs(mousePosition.y - ((player.y+player.h/2))/CELLSIZE), 2));
if(distance <= 1){
stateHover = 1;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment