update deprecated function

updated GetScreenToWorldRay() to GetMouseRay()
This commit is contained in:
Alex 2024-09-01 10:05:54 +09:00 committed by GitHub
parent 5f49ec3d64
commit 5e59d1d061
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,7 +109,7 @@ int main(void)
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
{
// Check collision between ray and box
if (GetRayCollisionBox(GetScreenToWorldRay(GetMousePosition(), camera), bounds).hit) selected = !selected;
if (GetRayCollisionBox(GetMouseRay(GetMousePosition(), camera), bounds).hit) selected = !selected;
else selected = false;
}
//----------------------------------------------------------------------------------
@ -150,4 +150,4 @@ int main(void)
//--------------------------------------------------------------------------------------
return 0;
}
}