I would like to make a StandardGame version of TestJMEDesktop and am starting with the code from jmetest.awt.swingui.TestJMEDesktopState. The only thing that I have added is a button which should rotate the entire jmedesktop about 30 degrees…
// Add a Rotate button
JButton rotate = new JButton("Rotate" );
desktopState.getDesktop().getJDesktop().add(rotate);
rotate.setLocation(200, 0);
rotate.setSize(rotate.getPreferredSize());
rotate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
//translate works, but rotate does not
//desktopState.getGUINode().getLocalTranslation().addLocal(10f, 0f, 0f);
desktopState.getGUINode().getLocalRotation().fromAngleAxis(0.5f, new Vector3f(0,1,0));
}
});
I have added this button right after the "quit" button and it shows up correctly...

However, when I click on the button, instead of rotating, I get this...

Do I have to refresh something or are my camera settings wrong?