Make A and D turn the camera left and right, respectively.
authorBernie Innocenti <bernie@codewiz.org>
Sat, 8 Apr 2017 16:17:46 +0000 (12:17 -0400)
committerBernie Innocenti <bernie@codewiz.org>
Sat, 8 Apr 2017 16:17:46 +0000 (12:17 -0400)
support/camera.rs

index 9f0e3bac45ea2422d0335a545b0e8c21b158dd28..77ad0933c26e85fdd85171a7d02b2bc4759067b3 100644 (file)
@@ -131,11 +131,11 @@ impl CameraState {
             self.pos.2 -= f.2 * 0.01;
         }
         if self.turning_left {
-            let a: f32 = -0.05;
+            let a: f32 = 0.05;
             self.dir = Vec3(f.0 * a.cos() + f.2 * a.sin(), f.1, - f.0 * a.sin() + f.2 * a.cos());
         }
         if self.turning_right {
-            let a: f32 = 0.05;
+            let a: f32 = -0.05;
             self.dir = Vec3(f.0 * a.cos() + f.2 * a.sin(), f.1, - f.0 * a.sin() + f.2 * a.cos());
         }
         if self.turning_up {