loadCharacter(event.getSelectedId());
}
private void loadCharacter(String id) {
Node characterNode = new Node("character");
Spatial character = app.getAssetManager().loadModel("character/" + id + "/Mesh.mesh.xml");
character.setLocalTranslation(0f, 0f, 5f);
Material mat_character = new Material(app.getAssetManager(), "Common/MatDefs/Light/Lighting.j3md");
mat_character.setTexture("DiffuseMap", app.getAssetManager().loadTexture("character/male/male.png"));
character.setMaterial(mat_character);
Quaternion rotate = new Quaternion();
rotate.fromAngleAxis(-FastMath.PI / 2, new Vector3f(1, 0, 0));
character.setLocalRotation(rotate);
characterNode.attachChild(character);
app.getRootNode().attachChild(characterNode);
System.out.println(cam.getDirection());
}