浏览代码

Update models_loading.c

Ray 4 年之前
父节点
当前提交
d39d26f275
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/models/models_loading.c

+ 1 - 1
examples/models/models_loading.c

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