aboutsummaryrefslogtreecommitdiff
path: root/examples/models/models_obj_loading.c
diff options
context:
space:
mode:
authorRay San <raysan5@gmail.com>2018-04-11 10:13:00 +0200
committerRay San <raysan5@gmail.com>2018-04-11 10:13:00 +0200
commit4cc12ef2b32f66f160e4e401e5cd76d1740eaf61 (patch)
treef9a43a0d3e69aa430e3a8152bb6b5b9268c3b1be /examples/models/models_obj_loading.c
parentcc3b8645df23ed9aeb9d6efc806ab91170a29a89 (diff)
downloadraylib-4cc12ef2b32f66f160e4e401e5cd76d1740eaf61.tar.gz
raylib-4cc12ef2b32f66f160e4e401e5cd76d1740eaf61.zip
Review camera definition on examples
Diffstat (limited to 'examples/models/models_obj_loading.c')
-rw-r--r--examples/models/models_obj_loading.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/models/models_obj_loading.c b/examples/models/models_obj_loading.c
index 70f92168..4f89130f 100644
--- a/examples/models/models_obj_loading.c
+++ b/examples/models/models_obj_loading.c
@@ -21,7 +21,12 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [models] example - obj model loading");
// Define the camera to look into our 3d world
- Camera camera = {{ 3.0f, 3.0f, 3.0f }, { 0.0f, 1.5f, 0.0f }, { 0.0f, 1.0f, 0.0f }, 45.0f };
+ Camera camera = { 0 };
+ camera.position = (Vector3){ 3.0f, 3.0f, 3.0f };
+ camera.target = (Vector3){ 0.0f, 1.5f, 0.0f };
+ camera.up = (Vector3){ 0.0f, 1.0f, 0.0f };
+ camera.fovy = 45.0f;
+ camera.type = CAMERA_PERSPECTIVE;
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture