Billboards facing the wrong way

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
programmeur
Posts: 3
Joined: Tue Dec 16, 2003 3:34 pm
Location: France

Billboards facing the wrong way

Post by programmeur »

Hi,

I've got a really newbie question. It's the first time I use billboards with Irrlicht. It seems I'm not able to make the billboard face the camera the right way. Here is the texture I use for my billboard:

Image

And here is what I get in the app:

Image

The code I use is:

Code: Select all

p_pBillbExit = smgr->addBillboardSceneNode();
p_pBillbExit->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
p_pBillbExit->setMaterialTexture(0, driver->getTexture("data/menu/exit.bmp"));
p_pBillbExit->setMaterialFlag(video::EMF_LIGHTING, false);
p_pBillbExit->setSize(dimension2d<f32>(180, 40));
Billboards are supposed to always face the camera, aren't they ? Does anybody see the problem ? :shock: Or should I just play games instead of trying to develop one ? :wink: :roll:

Thanks !

Edit> My camera is placed that way:

Code: Select all

p_pCam = smgr->addCameraSceneNode(0, vector3df(0, 0, 200), vector3df(0, 0, 0));
Dataleap
Posts: 8
Joined: Thu Apr 22, 2004 1:21 pm

Post by Dataleap »

Try negative value for the size.
Last edited by Dataleap on Sat Apr 24, 2004 12:18 pm, edited 2 times in total.
programmeur
Posts: 3
Joined: Tue Dec 16, 2003 3:34 pm
Location: France

Post by programmeur »

Thanks for reply.

It worked ! I don't know why I have to use negative values... anyway, it's better than my 180°-Photoshop-sprite-rotating solution :wink:

Thanks again.
Post Reply