Skip to content

Commit

Permalink
moved update out of draw area (#4413)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrackedPixel authored Oct 22, 2024
1 parent 2a0963c commit fe66bfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/models/models_gpu_skinning.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit fe66bfb

Please sign in to comment.