improve camera zoom

isolation_bkp/dynres
Dominik Madarász 2021-05-10 18:02:23 +02:00
parent 3dc99c9198
commit 87319250b4
1 changed files with 2 additions and 1 deletions

View File

@ -92,7 +92,7 @@ void platform_input() {
float mouse_z = (GetMouseWheelMove()*0.5f);
if (mouse_z != 0.0f) {
target_zoom = zpl_clamp(render_camera.zoom+mouse_z, 0.3f, 10.0f);
target_zoom = zpl_clamp(target_zoom+mouse_z, 0.3f, 10.0f);
}
// NOTE(zaklaus): keystate handling
@ -174,6 +174,7 @@ void display_conn_status() {
}
DrawFPS(0, 20);
DrawText(TextFormat("Zoom: %.02f", target_zoom), 0, 45, 20, WHITE);
}
void DEBUG_draw_ground(uint64_t key, entity_view * data) {