Skip to content

Commit

Permalink
Fix a bug in examples/shapes/shapes_following_eyes (#3710)
Browse files Browse the repository at this point in the history
  • Loading branch information
casavaca authored Jan 6, 2024
1 parent a4dc325 commit 721e273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/shapes/shapes_following_eyes.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ int main(void)
irisRightPosition = GetMousePosition();

// Check not inside the left eye sclera
if (!CheckCollisionPointCircle(irisLeftPosition, scleraLeftPosition, scleraRadius - 20))
if (!CheckCollisionPointCircle(irisLeftPosition, scleraLeftPosition, scleraRadius - irisRadius))
{
dx = irisLeftPosition.x - scleraLeftPosition.x;
dy = irisLeftPosition.y - scleraLeftPosition.y;
Expand All @@ -65,7 +65,7 @@ int main(void)
}

// Check not inside the right eye sclera
if (!CheckCollisionPointCircle(irisRightPosition, scleraRightPosition, scleraRadius - 20))
if (!CheckCollisionPointCircle(irisRightPosition, scleraRightPosition, scleraRadius - irisRadius))
{
dx = irisRightPosition.x - scleraRightPosition.x;
dy = irisRightPosition.y - scleraRightPosition.y;
Expand Down

0 comments on commit 721e273

Please sign in to comment.