summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2024-04-20 19:58:14 +0200
committerRay <[email protected]>2024-04-20 19:58:14 +0200
commit68201c10c292ccc9a66bd301fb8cdded34e7c1ce (patch)
tree45d39a23474746e30f12285a0b66caee258f4e2f
parent41b0c5c4f9dcd80ab1228bee7eac35f9ab9f08e7 (diff)
downloadraylib-68201c10c292ccc9a66bd301fb8cdded34e7c1ce.tar.gz
raylib-68201c10c292ccc9a66bd301fb8cdded34e7c1ce.zip
Update 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();