How do I make an object point towards the camera?

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
jhend60
Posts: 44
Joined: Mon Oct 27, 2008 10:11 am
Location: behind you
Contact:

How do I make an object point towards the camera?

Post by jhend60 »

I have loaded a 3ds mesh target into my game, and wish to make the target points to wherever the camera is (to make a realistic effect). How will I do this? I want it to constantly update, and follow the cameras movement. Please help. When i use this method (mesh->setRotation(camera->getRotation());) and the object has a negative x or z value I cannot seem to hit it with the shoot function (from demo). Bullets go straight through.
wyrmmage
Posts: 204
Joined: Sun Mar 16, 2008 3:12 am
Contact:

Post by wyrmmage »

You might want to take a look at the IBillboardSceneNode class, since that's what is does (although it just does it with 2D objects)...might or might not be helpful.
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Post Reply