瀏覽代碼

ensure distance is greater than 0 in CameraMoveToTarget (#3031)

pull/3032/head
kolunmi 1 年之前
committed by GitHub
父節點
當前提交
98cb7a19a1
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/rcamera.h

+ 1
- 1
src/rcamera.h 查看文件

@ -294,7 +294,7 @@ void CameraMoveToTarget(Camera *camera, float delta)
distance += delta;
// Distance must be greater than 0
if (distance < 0) distance = 0.001f;
if (distance <= 0) distance = 0.001f;
// Set new distance by moving the position along the forward vector
Vector3 forward = GetCameraForward(camera);

Loading…
取消
儲存