Вы можете сделать это, получив свою модель текущего положения. Ниже метод может быть использован по нажатию кнопки. Надеюсь, это поможет вам
private void modleMovement(TransformableNode node, String moveMent) {
Vector3 currentPosition = new Vector3();
Vector3 move = new Vector3();
try {
currentPosition = Objects.requireNonNull(node.getLocalPosition());
if (moveMent.equals("down")) {
move.set(currentPosition.x, (float) (currentPosition.y - 0.1), currentPosition.z);
localPosition = move;
}
if (moveMent.equals("up")) {
move.set(currentPosition.x, (float) (currentPosition.y + 0.1), currentPosition.z);
localPosition = move;
}
if (moveMent.equals("right_move")) {
move.set((float) (currentPosition.x + 0.1), currentPosition.y, currentPosition.z);
localPosition = move;
}
if (moveMent.equals("left_move")) {
move.set((float) (currentPosition.x - 0.1), currentPosition.y, currentPosition.z);
localPosition = move;
}
if (moveMent.equals("rotate_left")) {
localPosition = currentPosition;
rotateLeft(node, objAxis, currentPosition);
}
if (moveMent.equals("rotate_right")) {
localPosition = currentPosition;
rotateRight(node, objAxis, currentPosition);
}
if (moveMent.equals("zoom_in")) {
move.set(currentPosition.x, currentPosition.y, (float) (currentPosition.z + 0.1));
localPosition = move;
}
if (moveMent.equals("zoom_out")) {
move.set(currentPosition.x, currentPosition.y, (float) (currentPosition.z - 0.1));
localPosition = move;
}
node.setLocalPosition(move);
} catch (Exception e) {
e.printStackTrace();
}
}