瀏覽代碼

Increase zoom factor in `core_2d_camera.c`

This compensate for slower zoom speed due to log scaling
pull/4845/head
Fabrizio Pietrucci 2 週之前
父節點
當前提交
e140aca1b5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      examples/core/core_2d_camera.c

+ 1
- 1
examples/core/core_2d_camera.c 查看文件

@ -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;

Loading…
取消
儲存