Quellcode durchsuchen

Increase zoom factor in `core_2d_camera.c`

This compensate for slower zoom speed due to log scaling
pull/4845/head
Fabrizio Pietrucci vor 2 Wochen
Ursprung
Commit
e140aca1b5
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. +1
    -1
      examples/core/core_2d_camera.c

+ 1
- 1
examples/core/core_2d_camera.c Datei anzeigen

@ -83,7 +83,7 @@ int main(void)
// Camera zoom controls
// Uses log scaling to provide consistent zoom speed
camera.zoom = expf(logf(camera.zoom) + ((float)GetMouseWheelMove()*0.05f));
camera.zoom = expf(logf(camera.zoom) + ((float)GetMouseWheelMove()*0.1f));
if (camera.zoom > 3.0f) camera.zoom = 3.0f;
else if (camera.zoom < 0.1f) camera.zoom = 0.1f;

Laden…
Abbrechen
Speichern