updated examples to fix mesh reference

This commit is contained in:
Dustin Simpson 2019-08-08 08:30:54 -07:00
parent 108f7f6fee
commit c022f87cd2
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ int main(void)
// Check ray collision against model // Check ray collision against model
// NOTE: It considers model.transform matrix! // NOTE: It considers model.transform matrix!
meshHitInfo = GetCollisionRayModel(ray, tower); meshHitInfo = GetCollisionRayModel(ray, &tower);
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance)) if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
{ {

View File

@ -54,7 +54,7 @@ int main(void)
{ {
if (IsFileExtension(droppedFiles[0], ".obj")) if (IsFileExtension(droppedFiles[0], ".obj"))
{ {
for (int i = 0; i < model.meshCount; i++) UnloadMesh(model.meshes[i]); for (int i = 0; i < model.meshCount; i++) UnloadMesh(&model.meshes[i]);
model.meshes = LoadMeshes(droppedFiles[0], &model.meshCount); model.meshes = LoadMeshes(droppedFiles[0], &model.meshCount);
bounds = MeshBoundingBox(model.meshes[0]); bounds = MeshBoundingBox(model.meshes[0]);
} }