]> git.localhorst.tv Git - space.git/blobdiff - src/graphics/Camera.cpp
adjust cam speed to zoom level
[space.git] / src / graphics / Camera.cpp
index ad2587f3e755e5a06b5fc47300da564ee4a426fe..ea2f97de328f5270a0edeab91c998d9444b9aefa 100644 (file)
@@ -5,7 +5,8 @@ namespace space {
 
 Camera::Camera(int w, int h, const Vector<float> &t)
 : target(&t)
-, offset(w/2, h/2)
+, size(w, h)
+, offset(size / 2)
 , zoom(1)
 , zoomAcc(0) {
 
@@ -13,7 +14,8 @@ Camera::Camera(int w, int h, const Vector<float> &t)
 
 
 void Camera::Resize(int w, int h) {
-       offset = Vector<float>(w/2, h/2);
+       size = Vector<int>(w, h);
+       offset = size / 2;
 }
 
 void Camera::Update(float delta) {