Simple Question of Node Translation

I was trying to transalte my Node t to (0,3,0). But no matter how I try, the box always stay at (0,0,0);

Geometry box=makebox();
Node t=new Node(“t”);
rootNode.attachChild(t);
t.setLocalTranslation(new Vector3f(0,3,0));
t.attachChild(box1);

Any ideas?

How do you know?

I can assure you that it doesn’t… presuming the code above is all that’s running.

You can see this by System.out.println(box.getWorldTranslation());

Most likely because you want to translate the Geometry “box” but you have attached the Geometry “box1” to your Node.

Nice catch man

Then what he wrote is confusing… because he describes exactly moving the node and expecting the child box to move… which it will.

Emphasis added by me:

…but the box does not stay at 0,0,0 unless he’s looking at the local translation… which is dumb/newbish/whatever because of course local translation won’t change. But that’s why I asked how he knew and suggested the world translation.

I suspect a trip through this is necessary but I can’t tell until OP responds with what’s really going on:
https://jmonkeyengine.github.io/wiki/tutorials/scenegraph/assets/fallback/index.html