diff options
author | Peter Wu <lekensteyn@gmail.com> | 2014-01-17 14:58:14 +0100 |
---|---|---|
committer | Peter Wu <lekensteyn@gmail.com> | 2014-01-17 14:58:14 +0100 |
commit | fd58d9209acbd32489608151924edc32d9dd8697 (patch) | |
tree | 35fb451eacaa0c91b809be3c9732089398609538 /src | |
parent | 72a4103bc0321906b638cbd73ad197145a2b6e9d (diff) | |
download | 2iv60-robots-fd58d9209acbd32489608151924edc32d9dd8697.tar.gz |
Fix camera up vector for helicopter
Stupid copy pasta...
Diffstat (limited to 'src')
-rw-r--r-- | src/Camera.java | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/Camera.java b/src/Camera.java index 8bc07a6..c9da648 100644 --- a/src/Camera.java +++ b/src/Camera.java @@ -117,15 +117,8 @@ class Camera { // center at the chosen robot. center = track.getPointForLane(focus.getTimePos(), focus.getLane()); - /* look in the direction where the robots walks, namely the tangent - Add the actual robot position to the tangent vector, and calculate - the normal vector based on the resulting vector. This is the up vector. */ - Vector robotPos = track.getPointForLane(focus.getTimePos(), - focus.getLane()); - Vector robotTangent = track.getTangent(focus.getTimePos()); - Vector totalVector = robotTangent.add(robotPos); - - up = new Vector(-totalVector.y(), totalVector.x(), 0); + // the head (up vector) points "forwards" + up = track.getTangent(focus.getTimePos()); // "above" is 10 meters. eye = center.add(new Vector(0, 0, 10f)); |