From 3f929048737241331715fbd2ab0db13d8f72b2e1 Mon Sep 17 00:00:00 2001 From: Phillip Date: Mon, 14 Mar 2011 08:11:16 +0000 Subject: Updated turning code for tank to rotate the shape rather than add/subtract rotational velocity. Still at a loss on how to accellerate in a given direction :( --- src/tesseract/objects/tank/Body.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tesseract/objects/tank/Body.java') diff --git a/src/tesseract/objects/tank/Body.java b/src/tesseract/objects/tank/Body.java index e67f3c1..bd7e0b0 100644 --- a/src/tesseract/objects/tank/Body.java +++ b/src/tesseract/objects/tank/Body.java @@ -41,6 +41,7 @@ public class Body { turretMove.setTranslation(new Vector3f(0, height * theScale, 0)); makeTurret(turretColor, theScale, turretMove); barrel.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE); + } private void makeBody(Color trackColor, Color bodyColor, float theScale) { @@ -121,7 +122,7 @@ public class Body { return barrel; } - public Vector3f[] getFacing() { - return vectors; + public Vector3f getFacing() { + return vectors[0]; } } -- cgit v1.2.3