text3dlibgdxbitmap-fonts

LibGDX FreetypeFont in 3D


Is there a proper way to use GDX FreeTypeFont in 3D?

I'm not trying to rotate the text, but I do want the text to go behind 3D objects if the object's center is in front of the text.

Any ideas on how to do this?

Is there somehow a way to attach a Bitmap to a ModelInstance or something, so I can pass it into a ModelBatch?

Thanks


Solution

  • One way would be to use a Decal and DecalBatch (which are sorted in 3D space). Your can draw the BitmapFont to a Pixmap and then draw that on a decal. You can use the same approach to create a TextureRegion and attach it to a 3D ModelInstance, but I think the Decal way is a little easier.