ensure distance is greater than 0 in CameraMoveToTarget (#3031)
This commit is contained in:
parent
e2996f167e
commit
98cb7a19a1
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ void CameraMoveToTarget(Camera *camera, float delta)
|
||||||
distance += delta;
|
distance += delta;
|
||||||
|
|
||||||
// Distance must be greater than 0
|
// 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
|
// Set new distance by moving the position along the forward vector
|
||||||
Vector3 forward = GetCameraForward(camera);
|
Vector3 forward = GetCameraForward(camera);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue