3d Camera: Added support for field-of-view Y
This commit is contained in:
parent
dcbf2a0e0c
commit
d8bd8634ab
20 changed files with 53 additions and 46 deletions
|
@ -25,6 +25,7 @@ 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, 1.0f, 0.0f };
|
||||
Vector3 cubeSize = { 2.0f, 2.0f, 2.0f };
|
||||
|
@ -35,6 +36,7 @@ int main()
|
|||
|
||||
SetCameraMode(CAMERA_FREE); // Set a free camera mode
|
||||
SetCameraPosition(camera.position); // Set internal camera position to match our camera position
|
||||
SetCameraFovy(camera.fovy); // Set internal camera field-of-view Y
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue