Page 1 of 1

The name of the character

Posted: Sat Aug 06, 2011 10:10 pm
by Sfortza
Have animated moving meshes for the characters.
I want to write the name of each of them over the head of the model.
How can I do that?

Thank you.

Re: The name of the character

Posted: Sat Aug 06, 2011 10:55 pm
by Iyad

Code: Select all

virtual ITextSceneNode* irr::scene::ISceneManager::addTextSceneNode(gui::IGUIFont *font, const wchar_t *text, video::SColor color = video::SColor(100, 255, 255, 255), ISceneNode *parent = 0, const core::vector3df &position = core::vector3df(0, 0, 0), s32 id = -1 )       
Add a text scene node with the name of your animated mesh, get the position of your character and then each frame textnode->setPosition(characterPos+vector3df(tallofcharacter)); or you can even parent the textnode with the character.

Re: The name of the character

Posted: Sun Aug 07, 2011 10:45 am
by Sfortza
Iyad, thank you very much!