3d Camera: Added support for field-of-view Y

This commit is contained in:
raysan5 2016-03-05 13:05:45 +01:00
parent dcbf2a0e0c
commit d8bd8634ab
20 changed files with 53 additions and 46 deletions

View file

@ -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
//--------------------------------------------------------------------------------------