Fixed model loading with bones.

Also updated license info on the model.
This commit is contained in:
Hristo Stamenov 2021-01-27 11:50:43 +02:00
commit 3452c9fcb0
3 changed files with 70 additions and 12 deletions

View file

@ -39,7 +39,7 @@ int main(void)
camera.fovy = 45.0f; // Camera field-of-view Y
camera.type = CAMERA_PERSPECTIVE; // Camera mode type
Model model = LoadModel("resources/models/rigged_figure.glb"); // Load the animated model mesh and
Model model = LoadModel("resources/rigged_figure/rigged_figure.glb"); // Load the animated model mesh and
// basic data
// Texture2D texture = LoadTexture("resources/guy/guytex.png"); // Load model texture and set material
// SetMaterialTexture(&model.materials[0], MAP_DIFFUSE, texture); // Set model material map texture
@ -48,7 +48,7 @@ int main(void)
// Load animation data
int animsCount = 0;
ModelAnimation *anims = LoadModelAnimations("resources/models/rigged_figure.glb", &animsCount);
ModelAnimation *anims = LoadModelAnimations("resources/rigged_figure/rigged_figure.glb", &animsCount);
int animFrameCounter = 0;
SetCameraMode(camera, CAMERA_FREE); // Set free camera mode
@ -92,7 +92,7 @@ int main(void)
EndMode3D();
DrawText("PRESS SPACE to PLAY MODEL ANIMATION", 10, 10, 20, MAROON);
DrawText("(c) Guy IQM 3D model by @culacant", screenWidth - 200, screenHeight - 20, 10, GRAY);
DrawText("(cc4) Rigged Figure by @Cesium", screenWidth - 200, screenHeight - 20, 10, GRAY);
EndDrawing();
//----------------------------------------------------------------------------------

View file

@ -0,0 +1,6 @@
Rigged Figure model has been created by Cesium (https://cesium.com/cesiumjs/),
and licensed as Creative Commons Attribution 4.0 International License.
It was donated to GLTF sample models for testing (https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/RiggedFigure)
Check for details: http://creativecommons.org/licenses/by/4.0/