BitmapText in 3D Space

Hello,



is it possible to put BitmapText in 3D space so that its center is following the localTranslation but its normal is always directing to the camera?

Thanks.



Regards,

Equi

See TestBitmapText3D on how to create text in 3D, then add BillboardControl on the BitmapText object to make it always face the camera

Hello,



I have added a Billboard Control to my BitmapText object. It does not have the desired effect. I looked at TestBitmapText3D and added following code…



[java]



BillboardControl billboardControl=new BillboardControl();

billboardControl.setAlignment(BillboardControl.Alignment.Screen);

txt.addControl(billboardControl);



[/java]



This works perfectly. Two questions.


  1. What exactly does transarent mean in this case? I thought this is just for making an object transparent.
  2. Is there a way not only to face an object to the camera but let it be in 3D space and project it to the GUI so that it is always in front of all other objects?



    It’s too late in the evening now but I’ll try this again tomorrow. Thanks.



    Regards,

    Equi
1. What exactly does transarent mean in this case? I thought this is just for making an object transparent.

Setting the queue bucket of an object to transparent enables back-to-front sorting for that object. It is needed to have transparent objects (like bitmap text) render correctly in 3D.

2. Is there a way not only to face an object to the camera but let it be in 3D space and project it to the GUI so that it is always in front of all other objects?

Instead of using billboard control you can make text in the GUI and set its position based on the 3D object using Camera.getScreenCoordinates(). Alternatively you can add the billboard text to a post viewport with depth clear so that it renders after the text.