summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Camera.java11
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));