Page 1 of 1

How do I make an object point towards the camera?

Posted: Wed Nov 12, 2008 12:31 am
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.

Posted: Wed Nov 12, 2008 3:37 am
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