Hi I am working with an automotive UI project using JavaFX. I am trying to rotate a speed needle image. The image is rotating from its center. I need to rotate it by from its end.How to change the point of rotation like a pivot point or something.?Here is my code
private void rotateNeedle(){
rotateTransition = new RotateTransition(Duration.seconds(3), speedNeedle);
rotateTransition.setFromAngle(0);
rotateTransition.setToAngle(260);
rotateTransition.setAutoReverse(true);
rotateTransition.setAxis(new Point3D(0,0,10));
if (rotateTransition.getStatus() != Animation.Status.STOPPED) {
rotateTransition.stop();
} else {
rotateTransition.play();
}
}