Hi there ,
Is there a way to attach Lemur GUI widgets(Labels or buttons ) to a spatial node rather than a guiNode ?
what i am trying to do is to attach the Water Life Guard : 100 window container to this NPC Node
Code:
public void addInContainer(Node guiNode,String name,float Vx,float Vy,float Vz,float scaleX,float scaleY,float scaleZ,ColorRGBA color,String text){
Container window = new Container();
guiNode.attachChild(window);
Label guitext=new Label(text);
guitext.setName(name);
guitext.setColor(color);
window.setLocalScale(new Vector3f(scaleX,scaleY,scaleZ));
window.addChild(guitext);
window.setLocalTranslation(new Vector3f(Vx , Vy, Vz));
}
addInContainer(guiNode,"NPCLifeText" ,settings.getWidth()-250f, settings.getHeight(), nPc.getLocalTranslation().getZ(), 1.5f, 1.5f, 1.5f, ColorRGBA.White, "Water Guard Life : "+Mars.NPCLife);