diff options
| author | victorfisac <victorfisac@gmail.com> | 2016-01-20 13:48:00 +0100 |
|---|---|---|
| committer | victorfisac <victorfisac@gmail.com> | 2016-01-20 13:48:00 +0100 |
| commit | c04752c0e4b646638ce6adf991750763c2dbf393 (patch) | |
| tree | 9fdafdbdd04dda343a25ac40768900d2d5016da6 /examples/core_3d_picking.c | |
| parent | 4cc394c376c83926da67afe14855d2a3e2b06cfd (diff) | |
| parent | 29c618a35e19c1c00be94bf423ad6af7ecf1d3f8 (diff) | |
| download | raylib-c04752c0e4b646638ce6adf991750763c2dbf393.tar.gz raylib-c04752c0e4b646638ce6adf991750763c2dbf393.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'examples/core_3d_picking.c')
| -rw-r--r-- | examples/core_3d_picking.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/core_3d_picking.c b/examples/core_3d_picking.c index 0d6f4ac7..9a6cc138 100644 --- a/examples/core_3d_picking.c +++ b/examples/core_3d_picking.c @@ -21,10 +21,10 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d picking"); // Define the camera to look into our 3d world - Camera camera = {{ 0.0, 10.0, 10.0 }, { 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }}; + Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }}; - Vector3 cubePosition = { 0.0, 1.0, 0.0 }; - Vector3 cubeSize = { 2.0, 2.0, 2.0 }; + Vector3 cubePosition = { 0.0f, 1.0f, 0.0f }; + Vector3 cubeSize = { 2.0f, 2.0f, 2.0f }; Ray ray; // Picking line ray @@ -50,8 +50,8 @@ int main() // Check collision between ray and box collision = CheckCollisionRayBox(ray, - (Vector3){cubePosition.x - cubeSize.x / 2,cubePosition.y - cubeSize.y / 2,cubePosition.z - cubeSize.z / 2}, - (Vector3){cubePosition.x + cubeSize.x / 2,cubePosition.y + cubeSize.y / 2,cubePosition.z + cubeSize.z / 2}); + (Vector3){ cubePosition.x - cubeSize.x/2, cubePosition.y - cubeSize.y/2, cubePosition.z - cubeSize.z/2 }, + (Vector3){ cubePosition.x + cubeSize.x/2, cubePosition.y + cubeSize.y/2, cubePosition.z + cubeSize.z/2 }); } //---------------------------------------------------------------------------------- @@ -65,10 +65,10 @@ int main() DrawCube(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, GRAY); DrawCubeWires(cubePosition, cubeSize.x, cubeSize.y, cubeSize.z, DARKGRAY); - - DrawGrid(10.0, 1.0); DrawRay(ray, MAROON); + + DrawGrid(10, 1.0f); End3dMode(); |
