From UV to Vertex on a Sphere


#21

I have learned a lot! Thank you very much guys.
I did not manage to do exactly what I wanted to do but I’m in a good enough progress.

One question though…
I wanted to add some text (label) to my Globe child nodes so I have added this function:

private void addGeoText(String text, Node parent) {

    guiFont = assetManager.loadFont("Interface/Fonts/Default.fnt");

    BitmapText txt = new BitmapText(guiFont, false);
    txt.setSize(guiFont.getCharSet().getRenderedSize());
    txt.setText(text); //
    txt.setColor(new ColorRGBA(1f,0.8f,0.3f,0.8f));

    Node bb = new Node("billboard");
    BillboardControl control=new BillboardControl();
    bb.addControl(control);
    bb.attachChild(txt);
    parent.attachChild(bb);

}

where Node parent is the Globe child node which I want to attach the label to.
For some reason the label is not placed in the same position of the node but rather far away from it…
What do you think?


#22

Perhaps a screenshot would help clarify the issue for us.


#23

Thank you guys again.
I did not have any time left to fine tune the presentation but here is the current result :slight_smile: :
https://youtu.be/2U3cvPBLr7s