summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2013-12-02 19:05:24 +0100
committerPeter Wu <lekensteyn@gmail.com>2013-12-02 19:05:24 +0100
commite57cd0352a21e46c80833732a734c772869c7b01 (patch)
tree0707fc49cda91fc0a66f5ba7dee9283f35a81e25 /src
parentf77715e418ce21c1d7b5440b1d98f125657fe2a8 (diff)
download2iv60-robots-e57cd0352a21e46c80833732a734c772869c7b01.tar.gz
Less brainfucked center point effect
Diffstat (limited to 'src')
-rw-r--r--src/Camera.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Camera.java b/src/Camera.java
index e865bc7..229344b 100644
--- a/src/Camera.java
+++ b/src/Camera.java
@@ -71,12 +71,15 @@ class Camera {
Ex = s * (float) sin(gs.theta);
Ey = s * (float) cos(gs.theta);
- // change center point with WASD
- Ex += gs.cnt.x();
- Ey += gs.cnt.y();
- Ez += gs.cnt.z();
-
eye = new Vector(Ex, Ey, Ez);
+
+ // change center point with WASD (broken, but this was not required by
+ // the assignment)
+ double Cx, Cy, Cz;
+ Cx = gs.cnt.x();
+ Cy = gs.cnt.y();
+ Cz = gs.cnt.z();
+ center = new Vector(Cx, Cy, Cz);
}
/**