i’m trying how to control animation, but i got unsupported problem here is my code
public class HelloAnimation extends SimpleApplication implements AnimEventListener{
private AnimChannel channel;
private AnimControl control;
private Node player;
public static void main(String[] args){
HelloAnimation app=new HelloAnimation();
app.start();
}
@Override
public void simpleInitApp() {
this.flyCam.setMoveSpeed(50);
viewPort.setBackgroundColor(ColorRGBA.LightGray);
DirectionalLight dl=new DirectionalLight(
new Vector3f(-0.1f,-1f,-1).normalizeLocal());
rootNode.addLight(dl);
player=(Node)assetManager.loadModel("Models/animPlayer.j3o");
player.setLocalScale(0.1f);
rootNode.attachChild(player);
control=player.getChild("Cube").getControl(AnimControl.class);
control.addListener(this);
channel=control.createChannel();
channel.setAnim("Action", 1);
}
@Override
public void onAnimCycleDone(AnimControl control, AnimChannel channel, String animName) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
@Override
public void onAnimChange(AnimControl control, AnimChannel channel, String animName) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
}