The name of the character

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Sfortza
Posts: 39
Joined: Thu Mar 17, 2011 12:40 pm
Location: 184

The name of the character

Post 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.
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Re: The name of the character

Post 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.
#include <Iyad.h>
Sfortza
Posts: 39
Joined: Thu Mar 17, 2011 12:40 pm
Location: 184

Re: The name of the character

Post by Sfortza »

Iyad, thank you very much!
Post Reply