ensure distance is greater than 0 in CameraMoveToTarget

This commit is contained in:
kolunmi 2023-04-26 13:03:18 -07:00
parent e2996f167e
commit 1315efde28

View File

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