Преглед на файлове

GetCollisionRayMesh makes use of triangle count (#1688)

Co-authored-by: Carlos Hernandez Barbera <carloshdezbarbera@gmail.com>
pull/1689/head
Carlos Hernandez Barbera преди 3 години
committed by GitHub
родител
ревизия
7eaeffc8d9
No known key found for this signature in database GPG ключ ID: 4AEE18F83AFDEB23
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. +1
    -2
      src/models.c

+ 1
- 2
src/models.c Целия файл

@ -2987,8 +2987,7 @@ RayHitInfo GetCollisionRayMesh(Ray ray, Mesh mesh, Matrix transform)
// Check if mesh vertex data on CPU for testing
if (mesh.vertices != NULL)
{
// model->mesh.triangleCount may not be set, vertexCount is more reliable
int triangleCount = mesh.vertexCount / 3;
int triangleCount = mesh.triangleCount;
// Test against all triangles in mesh
for (int i = 0; i < triangleCount; i++)

Зареждане…
Отказ
Запис