mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-22 17:11:45 +00:00
Update text_draw_3d.c
This commit is contained in:
@@ -191,10 +191,10 @@ int main(void)
|
|||||||
Ray ray = GetMouseRay(GetMousePosition(), camera);
|
Ray ray = GetMouseRay(GetMousePosition(), camera);
|
||||||
|
|
||||||
// Check collision between ray and box
|
// Check collision between ray and box
|
||||||
bool collision = CheckCollisionRayBox(ray,
|
RayCollision collision = GetRayCollisionBox(ray,
|
||||||
(BoundingBox){(Vector3){ cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2 },
|
(BoundingBox){(Vector3){ cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2 },
|
||||||
(Vector3){ cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2 }});
|
(Vector3){ cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2 }});
|
||||||
if (collision)
|
if (collision.hit)
|
||||||
{
|
{
|
||||||
// Generate new random colors
|
// Generate new random colors
|
||||||
light = GenerateRandomColor(0.5f, 0.78f);
|
light = GenerateRandomColor(0.5f, 0.78f);
|
||||||
|
Reference in New Issue
Block a user