Direction to mark arrow is now displayed relative to camera
#story[1195]
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user