Hello all,
I am trying to add a sword to Sinbad, but when I use SkeletonControl.getAttachementNode() I could not see my sword
Here is my code that I use to test it:
[java]public void simpleInitApp() {
viewPort.setBackgroundColor(ColorRGBA.LightGray);
DirectionalLight dl = new DirectionalLight();
dl.setDirection(new Vector3f(-0.1f, -1f, -1).normalizeLocal());
rootNode.addLight(dl);
player = (Node) assetManager.loadModel(âModels/Sinbad/Sinbad.mesh.xmlâ);
player.setLocalScale(0.05f);
rootNode.attachChild(player);
SkeletonControl sc = player.getControl(SkeletonControl.class);
Node sword = (Node) assetManager.loadModel("be/game/assets/sword.blend");
sword.setLocalScale(0.5f);
Node aNode = sc.getAttachmentsNode("Hand.R");
aNode.attachChild(sword);
}[/java]
Am I doing something wrong ?