Direction to mark arrow is now displayed relative to camera

#story[1195]
This commit is contained in:
cbt24
2017-09-13 16:10:41 +12:00
parent 5f96526fcc
commit de9f4e22eb
2 changed files with 7 additions and 3 deletions
@@ -371,9 +371,9 @@ public class RaceController extends Controller {
CompoundMark target = boat.getCurrentLeg().getEndCompoundMark(); CompoundMark target = boat.getCurrentLeg().getEndCompoundMark();
Bearing headingToMark = GPSCoordinate.calculateBearing(boat.getPosition(), target.getAverageGPSCoordinate()); Bearing headingToMark = GPSCoordinate.calculateBearing(boat.getPosition(), target.getAverageGPSCoordinate());
nextMarkArrow.setY(10); nextMarkArrow.setX(view3D.getPivot().getX());
nextMarkArrow.setX(subject3D.getPosition().getX()); nextMarkArrow.setY(view3D.getPivot().getY());
nextMarkArrow.setZ(subject3D.getPosition().getZ()); nextMarkArrow.setZ(view3D.getPivot().getZ() + 10);
nextMarkArrow.setHeading(headingToMark.degrees()); nextMarkArrow.setHeading(headingToMark.degrees());
}; };
@@ -251,6 +251,10 @@ public class View3D extends Pane {
this.farClip = farClip; this.farClip = farClip;
} }
public Translate getPivot() {
return pivot;
}
/** /**
* Sets the coordinates of the camera pivot once. * Sets the coordinates of the camera pivot once.
* @param pivot source of coordinates * @param pivot source of coordinates