Screen space related functions consistency (#3830)

* Screen/world-space related functions rename

* Update raylib_api.* by CI

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
aiafrasinei 2024-03-07 13:28:11 +02:00 committed by GitHub
parent fccdfa7926
commit 3b7be85151
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 19 additions and 19 deletions

View file

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

View file

@ -88,7 +88,7 @@ int main(void)
Color cursorColor = WHITE;
// Get ray and test against objects
ray = GetMouseRay(GetMousePosition(), camera);
ray = GetScreenToWorldRay(GetMousePosition(), camera);
// Check ray collision against ground quad
RayCollision groundHitInfo = GetRayCollisionQuad(ray, g0, g1, g2, g3);