Hi, I’m just testing easy method to render few trees. I got few Nodes on my scene - all named Tree, and I’m getting location of each node, and placing there a tree model. It work only for 1 - only 1 tree is placing at 1 node’s coords. What’s wrong?
[java] Node trees;
trees = (Node) map.getChild("Trees");
System.out.println(trees);
Node tree;
Node treeModel = (Node) assetManager.loadModel("Models/Tree2/Tree2.j3o");
for (int i = 0; i < 2; i++) {
tree = (Node) trees.getChild(i);
treeModel.setLocalTranslation(tree.getWorldTranslation());
map.attachChild(treeModel);
}[/java]