From fe66bfb7850d3b599af2c6c502176871239487a5 Mon Sep 17 00:00:00 2001 From: Anthony Carbajal <5776225+CrackedPixel@users.noreply.github.com> Date: Tue, 22 Oct 2024 03:31:44 -0500 Subject: [PATCH] moved update out of draw area (#4413) --- examples/models/models_gpu_skinning.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/models/models_gpu_skinning.c b/examples/models/models_gpu_skinning.c index b6296c96ae89..6868a62d3fd5 100644 --- a/examples/models/models_gpu_skinning.c +++ b/examples/models/models_gpu_skinning.c @@ -81,6 +81,8 @@ int main(void) // Update model animation ModelAnimation anim = modelAnimations[animIndex]; animCurrentFrame = (animCurrentFrame + 1)%anim.frameCount; + characterModel.transform = MatrixTranslate(position.x, position.y, position.z); + UpdateModelAnimationBoneMatrices(characterModel, anim, animCurrentFrame); //---------------------------------------------------------------------------------- // Draw @@ -92,8 +94,6 @@ int main(void) BeginMode3D(camera); // Draw character - characterModel.transform = MatrixTranslate(position.x, position.y, position.z); - UpdateModelAnimationBoneMatrices(characterModel, anim, animCurrentFrame); DrawMesh(characterModel.meshes[0], characterModel.materials[1], characterModel.transform); DrawGrid(10, 1.0f);