diff options
| author | Ray <[email protected]> | 2024-02-26 11:03:12 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2024-02-26 11:03:12 +0100 |
| commit | 7fae41b5c6f218c4e50fa738bae16c7ca924011a (patch) | |
| tree | 8c145332822109904e32064d085978e51035f62f /examples/models | |
| parent | a6425fa1b905f410e02def3d2f11f2d968358371 (diff) | |
| download | raylib-7fae41b5c6f218c4e50fa738bae16c7ca924011a.tar.gz raylib-7fae41b5c6f218c4e50fa738bae16c7ca924011a.zip | |
Update models_bone_socket.c
Diffstat (limited to 'examples/models')
| -rw-r--r-- | examples/models/models_bone_socket.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/models/models_bone_socket.c b/examples/models/models_bone_socket.c index 0e046327..8f62f70f 100644 --- a/examples/models/models_bone_socket.c +++ b/examples/models/models_bone_socket.c @@ -35,13 +35,12 @@ int main(void) InitWindow(screenWidth, screenHeight, "raylib [models] example - bone socket"); // Define the camera to look into our 3d world - Camera camera = { - .position = { 5.0f, 5.0f, 5.0f }, // Camera position - .target = { 0.0f, 2.0f, 0.0f }, // Camera looking at point - .up = { 0.0f, 1.0f, 0.0f }, // Camera up vector (rotation towards target) - .fovy = 45.0f, // Camera field-of-view Y - .projection = CAMERA_PERSPECTIVE // Camera projection type - }; + Camera camera = { 0 }; + camera.position = (Vector3){ 5.0f, 5.0f, 5.0f }; // Camera position + camera.target = (Vector3){ 0.0f, 2.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 + camera.projection = CAMERA_PERSPECTIVE; // Camera projection type // Load gltf model Model characterModel = LoadModel("resources/models/gltf/greenman.glb"); // Load character model @@ -132,7 +131,7 @@ int main(void) DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform); // Draw equipments (hat, sword, shield) - for (unsigned short i=0; i<BONE_SOCKETS; i++) + for (int i = 0; i < BONE_SOCKETS; i++) { if (!showEquip[i]) continue; @@ -171,7 +170,7 @@ int main(void) UnloadModel(characterModel); // Unload character model and meshes/material // Unload equipment model and meshes/material - for (unsigned short i = 0; i < BONE_SOCKETS; i++) UnloadModel(equipModel[i]); + for (int i = 0; i < BONE_SOCKETS; i++) UnloadModel(equipModel[i]); CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- |
