Added basic highlighting to player boat. #story[1298]
This commit is contained in:
@@ -322,6 +322,21 @@ public class RaceViewController extends Controller {
|
|||||||
};
|
};
|
||||||
trackBoat.start();
|
trackBoat.start();
|
||||||
|
|
||||||
|
if (boat.isClientBoat()) {
|
||||||
|
BoatHighlight boatHighlight = new BoatHighlight(10, new Color(1, 1, 0, 0.1));
|
||||||
|
viewSubjects.add(boatHighlight);
|
||||||
|
boatModel.getMesh().toFront();
|
||||||
|
AnimationTimer highlightTrack = new AnimationTimer() {
|
||||||
|
@Override
|
||||||
|
public void handle(long now) {
|
||||||
|
boatHighlight.setX(boatModel.getPosition().getX());
|
||||||
|
boatHighlight.setY(boatModel.getPosition().getY());
|
||||||
|
boatHighlight.setZ(boatModel.getPosition().getZ());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
highlightTrack.start();
|
||||||
|
}
|
||||||
|
|
||||||
Material markColor = new PhongMaterial(new Color(0.15,0.9,0.2,1));
|
Material markColor = new PhongMaterial(new Color(0.15,0.9,0.2,1));
|
||||||
CompoundMark nextMark = boat.getCurrentLeg().getEndCompoundMark();
|
CompoundMark nextMark = boat.getCurrentLeg().getEndCompoundMark();
|
||||||
view3D.getShape(nextMark.getMark1().getSourceID()).getMesh().setMaterial(markColor);
|
view3D.getShape(nextMark.getMark1().getSourceID()).getMesh().setMaterial(markColor);
|
||||||
|
|||||||
Reference in New Issue
Block a user