Make node parent of billboard Text node [solved]
Posted: Wed Jul 11, 2007 7:38 pm
Hi guys,
I create a player and I want to attach some number and name to this player. When I will move the player, the text should follow.
Here is my code:
When i change the parent node pointer to player1 the text does not display anymore. Why is this, what am i doing wrong.
I create a player and I want to attach some number and name to this player. When I will move the player, the text should follow.
Here is my code:
Code: Select all
IAnimatedMesh* mesh = smgr->getMesh("media/cubeplayer.x");
IAnimatedMeshSceneNode* player1;
float pos = 170;
player1 = smgr->addAnimatedMeshSceneNode(mesh);
player1->setID(1000);
player1->setMaterialFlag(EMF_LIGHTING, false);
player1->setPosition(core::vector3df(pos,151.f,-170));
player1->setScale(core::vector3df(-150.f,150.f,150.f));
smgr->addBillboardTextSceneNode(
env->getFont("media/fontlucida.png"),
L"<01>Pietje, Blitzer",
0, // parent node pointer
dimension2d< f32 >(750.0f, 150.0f),
vector3df(pos, 400, -170),
-1,
0x00000000,
0x00000000
);