summaryrefslogtreecommitdiffhomepage
path: root/examples/models/models_cubicmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/models/models_cubicmap.c')
-rw-r--r--examples/models/models_cubicmap.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/examples/models/models_cubicmap.c b/examples/models/models_cubicmap.c
index 2cbb7bf3..8e1c1fa1 100644
--- a/examples/models/models_cubicmap.c
+++ b/examples/models/models_cubicmap.c
@@ -46,6 +46,8 @@ int main(void)
Vector3 mapPosition = { -16.0f, 0.0f, -8.0f }; // Set model position
UnloadImage(image); // Unload cubesmap image from RAM, already uploaded to VRAM
+
+ bool pause = false; // Pause camera orbital rotation (and zoom)
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@@ -55,7 +57,9 @@ int main(void)
{
// Update
//----------------------------------------------------------------------------------
- UpdateCamera(&camera, CAMERA_ORBITAL);
+ if (IsKeyPressed(KEY_P)) pause = !pause;
+
+ if (!pause) UpdateCamera(&camera, CAMERA_ORBITAL);
//----------------------------------------------------------------------------------
// Draw
@@ -72,10 +76,10 @@ int main(void)
DrawTextureEx(cubicmap, (Vector2){ screenWidth - cubicmap.width*4.0f - 20, 20.0f }, 0.0f, 4.0f, WHITE);
DrawRectangleLines(screenWidth - cubicmap.width*4 - 20, 20, cubicmap.width*4, cubicmap.height*4, GREEN);
-
+
DrawText("cubicmap image used to", 658, 90, 10, GRAY);
DrawText("generate map 3d model", 658, 104, 10, GRAY);
-
+
DrawFPS(10, 10);
EndDrawing();