Added new Wind Waker mesh

#implement #story[1293]
This commit is contained in:
Calum
2017-09-27 23:35:51 +13:00
parent ff4c2cd5b6
commit 42d490d6fd
5 changed files with 121 additions and 181 deletions
@@ -30,6 +30,8 @@ public class BoatObject extends Group {
private Color colour = Color.BLACK;
private Boolean isSelected = false;
private Rotate rotation = new Rotate(0, new Point3D(0,0,1));
// private Rotate tilt = new Rotate(0, new Point3D(0, 1, 0));
private double previousRotation = 0;
private ReadOnlyDoubleWrapper rotationProperty;
@@ -89,6 +91,14 @@ public class BoatObject extends Group {
private void rotateTo(double heading, boolean sailsIn, double windDir) {
rotationProperty.set(heading);
rotation.setAngle(heading);
// if (heading == previousRotation) {
// tilt.setAngle(0);
// } else if (heading < previousRotation) {
// tilt.setAngle(-10);
// } else {
// tilt.setAngle(10);
// }
// previousRotation = heading;
wake.getTransforms().setAll(new Rotate(heading, new Point3D(0,0,1)));
if (sailsIn) {
boatAssets.showSail();