updated examples to fix mesh reference
This commit is contained in:
parent
108f7f6fee
commit
c022f87cd2
|
|
@ -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))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user