Increase zoom threshold for smoother zoom transitions in simulation
All checks were successful
Build Simulation and Test / Run All Tests (push) Successful in 35s
All checks were successful
Build Simulation and Test / Run All Tests (push) Successful in 35s
This commit is contained in:
parent
330f199657
commit
737d595d50
@ -80,7 +80,7 @@ class Camera:
|
|||||||
zoom_smoothing_factor = 1 - pow(1 - self.zoom_smoothing, deltatime * 60)
|
zoom_smoothing_factor = 1 - pow(1 - self.zoom_smoothing, deltatime * 60)
|
||||||
self.zoom += (self.target_zoom - self.zoom) * zoom_smoothing_factor
|
self.zoom += (self.target_zoom - self.zoom) * zoom_smoothing_factor
|
||||||
|
|
||||||
zoom_threshold = 0.001
|
zoom_threshold = 0.01
|
||||||
if abs(self.zoom - self.target_zoom) < zoom_threshold:
|
if abs(self.zoom - self.target_zoom) < zoom_threshold:
|
||||||
self.zoom = self.target_zoom
|
self.zoom = self.target_zoom
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user