mirror of https://github.com/raysan5/raylib
Fix example/models/models_loading_gltf.c controls (#3268)
This commit is contained in:
parent
76adf883fd
commit
9393500bff
|
@ -63,8 +63,8 @@ int main(void)
|
|||
//----------------------------------------------------------------------------------
|
||||
UpdateCamera(&camera, CAMERA_THIRD_PERSON);
|
||||
// Select current animation
|
||||
if (IsKeyPressed(KEY_UP)) animIndex = (animIndex + 1)%animsCount;
|
||||
else if (IsKeyPressed(KEY_DOWN)) animIndex = (animIndex + animsCount - 1)%animsCount;
|
||||
if (IsMouseButtonPressed(MOUSE_BUTTON_RIGHT)) animIndex = (animIndex + 1)%animsCount;
|
||||
else if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT)) animIndex = (animIndex + animsCount - 1)%animsCount;
|
||||
|
||||
// Update model animation
|
||||
ModelAnimation anim = modelAnimations[animIndex];
|
||||
|
@ -85,7 +85,7 @@ int main(void)
|
|||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("Use the UP/DOWN arrow keys to switch animation", 10, 10, 20, GRAY);
|
||||
DrawText("Use the LEFT/RIGHT mouse buttons to switch animation", 10, 10, 20, GRAY);
|
||||
DrawText(TextFormat("Animation: %s", anim.name), 10, GetScreenHeight() - 20, 10, DARKGRAY);
|
||||
|
||||
EndDrawing();
|
||||
|
|
Loading…
Reference in New Issue