diff options
| author | raysan5 <[email protected]> | 2016-03-05 13:05:45 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2016-03-05 13:05:45 +0100 |
| commit | d8bd8634ab7d5179cb1481206176af1f8e592e75 (patch) | |
| tree | 1b22e39d70514808acbef6f7b2dcd2d5a50f3346 /examples/core_3d_camera_free.c | |
| parent | dcbf2a0e0c904870ac3ac59a3623a3954ab0243f (diff) | |
| download | raylib-d8bd8634ab7d5179cb1481206176af1f8e592e75.tar.gz raylib-d8bd8634ab7d5179cb1481206176af1f8e592e75.zip | |
3d Camera: Added support for field-of-view Y
Diffstat (limited to 'examples/core_3d_camera_free.c')
| -rw-r--r-- | examples/core_3d_camera_free.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/core_3d_camera_free.c b/examples/core_3d_camera_free.c index 4b45373d..234c46b3 100644 --- a/examples/core_3d_camera_free.c +++ b/examples/core_3d_camera_free.c @@ -25,12 +25,14 @@ int main() 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) + camera.fovy = 45.0f; // Camera field-of-view Y Vector3 cubePosition = { 0.0f, 0.0f, 0.0f }; SetCameraMode(CAMERA_FREE); // Set a free camera mode SetCameraPosition(camera.position); // Set internal camera position to match our camera position SetCameraTarget(camera.target); // Set internal camera target to match our camera target + SetCameraFovy(camera.fovy); // Set internal camera field-of-view Y SetTargetFPS(60); // Set our game to run at 60 frames-per-second //-------------------------------------------------------------------------------------- |
