Fix a bug in examples/shapes/shapes_following_eyes (#3710)
This commit is contained in:
parent
a4dc325a0c
commit
721e273547
@ -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;
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user