diff --git a/jme3-core/src/main/java/com/jme3/scene/Node.java b/jme3-core/src/main/java/com/jme3/scene/Node.java index fcd6f770c..ef3ed34b8 100644 --- a/jme3-core/src/main/java/com/jme3/scene/Node.java +++ b/jme3-core/src/main/java/com/jme3/scene/Node.java @@ -771,20 +771,22 @@ public class Node extends Spatial { } } } + @Override public void depthFirstTraversal(SceneGraphVisitor visitor, DFSMode mode) { if (mode == DFSMode.POST_ORDER) { for (Spatial child : children.getArray()) { - child.depthFirstTraversal(visitor); + child.depthFirstTraversal(visitor, mode); } visitor.visit(this); } else { //pre order visitor.visit(this); for (Spatial child : children.getArray()) { - child.depthFirstTraversal(visitor); + child.depthFirstTraversal(visitor, mode); } } } + @Override protected void breadthFirstTraversal(SceneGraphVisitor visitor, Queue queue) { queue.addAll(children);