summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_mesh_picking.c
diff options
context:
space:
mode:
authorDavid Reid <[email protected]>2018-04-21 17:26:40 +1000
committerDavid Reid <[email protected]>2018-04-21 17:26:40 +1000
commitf5ebbfb6bc80e5d5555e84ee505ff794c2bc64b6 (patch)
tree800aeb61be9c2018d1a048da54d1f6ab746f11f1 /examples/models/models_mesh_picking.c
parent950f31e620a9239dc91230ad92bb243f149e6f2c (diff)
parent847bdaf68287f70fbeb5599361257b6f982e48c5 (diff)
downloadraylib-f5ebbfb6bc80e5d5555e84ee505ff794c2bc64b6.tar.gz
raylib-f5ebbfb6bc80e5d5555e84ee505ff794c2bc64b6.zip
Merge branch 'master' of https://github.com/raysan5/raylib into dr/mini_al
Diffstat (limited to 'examples/models/models_mesh_picking.c')
-rw-r--r--examples/models/models_mesh_picking.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/models/models_mesh_picking.c b/examples/models/models_mesh_picking.c
index e150fe92..e09f9860 100644
--- a/examples/models/models_mesh_picking.c
+++ b/examples/models/models_mesh_picking.c
@@ -38,7 +38,7 @@ int main()
tower.material.maps[MAP_DIFFUSE].texture = texture; // Set model diffuse texture
Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position
- BoundingBox towerBBox = CalculateBoundingBox(tower.mesh);
+ BoundingBox towerBBox = MeshBoundingBox(tower.mesh); // Get mesh bounding box
bool hitMeshBBox = false;
bool hitTriangle = false;
@@ -101,8 +101,8 @@ int main()
{
hitMeshBBox = true;
- // Check ray collision against mesh
- meshHitInfo = GetCollisionRayMesh(ray, &tower.mesh);
+ // Check ray collision against model
+ meshHitInfo = GetCollisionRayModel(ray, &tower);
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
{