From fd58d9209acbd32489608151924edc32d9dd8697 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Fri, 17 Jan 2014 14:58:14 +0100 Subject: Fix camera up vector for helicopter Stupid copy pasta... --- src/Camera.java | 11 ++--------- 1 file 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)); -- cgit v1.2.1