Blender 2.66 animation playing horizontal

This might be a old thing but apparently i couldn’t find the solution. I created a simple animation in blender 2.66 and exported it using orge. I imported it in below example class , it works but it gets flipped by 90 degree and i couldn’t solve the issue.

Code:

package mygame;

import com.jme3.app.SimpleApplication;
import com.jme3.system.AppSettings;
import com.jme3.light.DirectionalLight;
import com.jme3.font.BitmapText;
import com.jme3.math.Vector3f;
import com.jme3.scene.Node;
import com.jme3.input.KeyInput;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.input.controls.ActionListener;
import com.jme3.animation.AnimChannel;
import com.jme3.animation.AnimControl;
import com.jme3.animation.AnimEventListener;
import com.jme3.animation.LoopMode;

public class Main extends SimpleApplication implements AnimEventListener{
private BitmapText sysout;//dubug to player screen
private Node root, placeholder, player;
private AnimChannel channel;
private AnimControl control;
private boolean play=false;//play or stop the animation

public static void main(String[] args) {
Main app = new Main();
//remove initial screen
app.setShowSettings(false);
AppSettings settings=new AppSettings(true);
settings.put(“Width”, 1024);
settings.put(“Height”, 768);
settings.put(“Title”, “My Game”);
settings.put(“VSync”, true);
settings.put(“Samples”, 4);
app.setSettings(settings);
app.start();
}

@Override
public void simpleInitApp() {
//the node “root” reorients the world space to coincide with Blender’s
reorient();
//writes to the play screen
enableDebug();

//hang the animation off a placholder that we can move without worrying
//about the animation.
placeholder=new Node(“placeholder”);
//root is the reoriented world space
root.attachChild(placeholder);
player=(Node)assetManager.loadModel(“Models/mycube1/mycube1.mesh.j3o”);
placeholder.attachChild(player);

initKeys();

//setup animation and set to Start animation as named in Ogre exporter
control=player.getControl(AnimControl.class);
control.addListener(this);
channel=control.createChannel();
channel.setAnim(“my_animation”);

DirectionalLight sun=new DirectionalLight();
sun.setDirection(new Vector3f(-0.1f,-0.7f,-1.0f));
rootNode.addLight(sun);

}

private void initKeys(){
inputManager.addMapping(“ccw”, new KeyTrigger(KeyInput.KEY_LEFT));
inputManager.addMapping(“cw”, new KeyTrigger(KeyInput.KEY_RIGHT));
inputManager.addMapping(“play”, new KeyTrigger(KeyInput.KEY_P));

inputManager.addListener(actionListener, “ccw”);
inputManager.addListener(actionListener, “cw”);
inputManager.addListener(actionListener, “play”);

}

private ActionListener actionListener=new ActionListener(){
public void onAction(String name, boolean keyPressed, float tpf){
debug(name);
if(name.equals(“ccw”)){
placeholder.rotate(0.0f,0.0f,-0.05f);
}
if(name.equals(“cw”)){
placeholder.rotate(0.0f,0.0f,0.05f);
}
if(name.equals(“play”) && !keyPressed){
if(!play){
channel.setAnim(“base_stand”, 0.5f);
channel.setLoopMode(LoopMode.Loop);
play=true;
}else{
channel.setAnim(“base_stand”, 0.5f);
play=false;
}
}
}
};

//need to implement listener methods
public void onAnimCycleDone(AnimControl control, AnimChannel channel,
String name){}

public void onAnimChange(AnimControl control, AnimChannel channel, String
name){}

@Override
public void simpleUpdate(float tpf){}

private void debug(String str){
sysout.setText(str);
}

private void reorient(){
root=new Node(“root”);
root.rotate((float)Math.toRadians(90.0f),(float)Math.toRadians(270.0f),0.0f);
root.setLocalTranslation(new Vector3f(0.0f,-2.5f,0.0f));
rootNode.attachChild(root);
//disable standard settings
flyCam.setEnabled(false);
}

private void enableDebug(){
//For debugging
guiNode.detachAllChildren();
guiFont=assetManager.loadFont(“Interface/Fonts/Default.fnt”);
sysout=new BitmapText(guiFont, false);
sysout.setSize(guiFont.getCharSet().getRenderedSize());
sysout.setLocalTranslation(300, sysout.getLineHeight(), 0);
guiNode.attachChild(sysout);
}
}

I will upload the blend file in a while

I got where i was wrong

i disabled below method and its working fine right now

root.rotate((float)Math.toRadians(90.0f),(float)Math.toRadians(270.0f),0.0f);