diff options
| author | raysan5 <raysan5@gmail.com> | 2016-02-11 14:56:27 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-02-11 14:56:27 +0100 |
| commit | 15cd4dce4ed19bb80a765eb8eeeca0c6583d7b2a (patch) | |
| tree | 335321147b8873de2cc7150a8a0a41c18b3403a1 /examples/core_3d_picking.c | |
| parent | 9cbfcbb8200252d846f447438a33cf47d32ffaf9 (diff) | |
| download | raylib-15cd4dce4ed19bb80a765eb8eeeca0c6583d7b2a.tar.gz raylib-15cd4dce4ed19bb80a765eb8eeeca0c6583d7b2a.zip | |
Updated examples to make them clearer
Diffstat (limited to 'examples/core_3d_picking.c')
| -rw-r--r-- | examples/core_3d_picking.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/core_3d_picking.c b/examples/core_3d_picking.c index 9a6cc138..fdf77030 100644 --- a/examples/core_3d_picking.c +++ b/examples/core_3d_picking.c @@ -21,7 +21,10 @@ int main() InitWindow(screenWidth, screenHeight, "raylib [core] example - 3d picking"); // Define the camera to look into our 3d world - Camera camera = {{ 0.0f, 10.0f, 10.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }}; + Camera camera; + camera.position = (Vector3){ 0.0f, 10.0f, 10.0f }; // Camera position + camera.target = (Vector3){ 0.0f, 0.0f, 0.0f }; // Camera looking at point + camera.up = (Vector3){ 0.0f, 1.0f, 0.0f }; // Camera up vector (rotation towards target) Vector3 cubePosition = { 0.0f, 1.0f, 0.0f }; Vector3 cubeSize = { 2.0f, 2.0f, 2.0f }; |
