Direction to mark arrow is now displayed relative to camera

#story[1195]
main
cbt24 8 years ago
parent 5f96526fcc
commit de9f4e22eb

@ -371,9 +371,9 @@ public class RaceController extends Controller {
CompoundMark target = boat.getCurrentLeg().getEndCompoundMark();
Bearing headingToMark = GPSCoordinate.calculateBearing(boat.getPosition(), target.getAverageGPSCoordinate());
nextMarkArrow.setY(10);
nextMarkArrow.setX(subject3D.getPosition().getX());
nextMarkArrow.setZ(subject3D.getPosition().getZ());
nextMarkArrow.setX(view3D.getPivot().getX());
nextMarkArrow.setY(view3D.getPivot().getY());
nextMarkArrow.setZ(view3D.getPivot().getZ() + 10);
nextMarkArrow.setHeading(headingToMark.degrees());
};

@ -251,6 +251,10 @@ public class View3D extends Pane {
this.farClip = farClip;
}
public Translate getPivot() {
return pivot;
}
/**
* Sets the coordinates of the camera pivot once.
* @param pivot source of coordinates

Loading…
Cancel
Save