diff options
| author | Ray <raysan5@gmail.com> | 2016-07-18 17:09:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-18 17:09:23 +0200 |
| commit | eaec086177e2386b4894be6a4fd3b7467471616b (patch) | |
| tree | 13ffbb1691b3de67421a93d266c9ceea124a9e20 /examples/core_3d_picking.c | |
| parent | a2794379a0e1e2ab1486888aaa710f65d492e0fc (diff) | |
| parent | bec58075ff42e71a7ed197a5c67e1aa4641b8a9a (diff) | |
| download | raylib-eaec086177e2386b4894be6a4fd3b7467471616b.tar.gz raylib-eaec086177e2386b4894be6a4fd3b7467471616b.zip | |
Merge pull request #135 from raysan5/develop
Integrate Develop branch
Diffstat (limited to 'examples/core_3d_picking.c')
| -rw-r--r-- | examples/core_3d_picking.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/examples/core_3d_picking.c b/examples/core_3d_picking.c index da303107..7f904f7f 100644 --- a/examples/core_3d_picking.c +++ b/examples/core_3d_picking.c @@ -68,8 +68,18 @@ int main() Begin3dMode(camera); - DrawCube(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, GRAY); - DrawCubeWires(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, DARKGRAY); + if (collision) + { + DrawCube(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, RED); + DrawCubeWires(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, MAROON); + + DrawCubeWires(cubePosition, cubeSize.x + 0.2f, cubeSize.y + 0.2f, cubeSize.z + 0.2f, GREEN); + } + else + { + DrawCube(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, GRAY); + DrawCubeWires(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, DARKGRAY); + } DrawRay(ray, MAROON); |
