Text doesn't get affected by setLocalTranslation on parent

Hello again, I’m starting to feel silly asking all these questions… anyway:



I’m trying to make a scoreboard to my HUD. It’s represented by a Node which has a large quad as a background. To the scoreboard I’m trying to draw entrys made out of this class:

/**
 * A scoreboard entry representing a Player.
 */
private class Entry extends Node {
   
   // The name, score and ping info.
   private Text[] label;      
   
   
   /**
    * Takes a <code>Player</code> and makes a scoreboard representation
    * of it.
    * @param player The <code>Player</code> to grab all the info from.
    */
   Entry(Player player) {
      super("Scoreboard Entry");
      label = new Text[] {
            new Text("name entry", player.node.getName()),
            new Text("score entry", ""+player.getScore()),
            new Text("ping entry", ""+player.getPing())
      };
      setRenderState(font);
      setRenderState(alpha);
      
      // Loop through the elements to set their translation and color and
      // then attach them to this node.
      int x = 0;
      for (int i = 0; i < label.length; i++) {
         label[i].setLocalTranslation(new Vector3f(x, 0, 0));
         label[i].setTextColor(Config.getInstance().
               scoreboardForegroundColor);
         attachChild(label[i]);
         x += 250;
      }
   }
}



As you see the Entry is extending Node and contains a series of Text objects.

The problem is that when I'm trying to move the whole entry by calling Node.setLocalTranslation(Vector3f) the Text objects doesn't seem to be affected...

This is strange, because when trying it with Quads insead of Texts, I get the desired result :?

Any ideas?

I don’t see it in the code posted, but it doesn’t mean you aren’t doing it. However, make sure you call updateGeometricState when you alter nodes position, orientation, etc. If you are already doing this, we’ll have to dig deeper.

Yes, I am, but I wasn’t sure what arguments to pass to it, so I tried updateGeometricState(0, true).



And well, as I said above, it works with Quads but not with Text

Ok, let me write up a little test for myself when I can and I’ll try to figure out what the problem is. Give me a bit as I’m at work now.

Ok, thanks for engaging

Fixed.

It should be noted that now text is fixed, some workarounds used might cause problems. Text properly moves with it’s parent node, so if you have text attached to a parent, and moving that parent around, your text is not going to be where it once once (pre-fix).