How do I make an object point towards the camera?
How do I make an object point towards the camera?
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.
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
-wyrmmage
Worlds at War (Current Project) - http://www.awkward-games.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com
Ganadu'r, The Eternal Sage (Other Current Project) - http://rpg.naget.com