Text on top the object3D

Started by MegasXLS, February 17, 2011, 06:55:40 PM

Previous topic - Next topic

MegasXLS

Guys

Anyone know a way to put text on top of a 3D object?

I got thinking about creating a plane and add a text in one texture and adds it as child of my 3D object. But I think there a better way.

I know how to put text on the screen using blit, but I wish it had a text object on top of him and follow him when the object moves.




I have used the method:

TextBlitter.blitText (smallFont, buffer, "Hello.", 37, 500, Color.black);

to display something on screen.

thanks for the help =)

raft

text is very sensitive for scaling such that it gets ugly and unreadable. that's why assigning text as a texture to a plane is not a good idea. it was my first attempt (see this image) but than i decided to blit text. this how it looks

for moving text with object, you can do that programatically. quite easy indeed. the catch is, since blitting always done after scene is rendered, there is no perfect solution to z-order text and 3d objects properly. but this problem does not happen very much. also depends on the scene


MegasXLS

Thanks for the help Raft. =) I'll try.