Make for smoother zoom.

This commit is contained in:
Nicolás Ortega Froysa 2018-10-25 23:40:22 +02:00
parent 72e2b3dd09
commit 29cfe699cc
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF
1 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ void camera::update(const input *in_sys) {
std::get<1>(pos) = dist * sin(yaw);
std::get<2>(pos) = dist * cos(yaw) * cos(angle);
dist -= in_sys->get_scroll();
if(dist < 0)
dist = 0;
dist -= static_cast<float>(in_sys->get_scroll()) / 2.5f;
if(dist < 0.0f)
dist = 0.0f;
}