Simple camera question

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
teh_fabs
Posts: 4
Joined: Sun Jul 15, 2007 8:57 pm

Simple camera question

Post by teh_fabs »

G'day. I am developing a simple 3d tanks game for fun, to learn the engine. I have set the parent of a camera scene node to the tank it is following. The tank is just an IAnimatedMeshSceneNode*. What's the easiest way to set the position AND the rotation to a point relative to the tank?

Thanks for answering :P This is where i'm finally stuck.
olivehehe_03
Posts: 157
Joined: Tue Mar 20, 2007 8:30 am

Post by olivehehe_03 »

I'm not sure exactly what you mean, but if you use setPosition() on your camera it will still be attached to your tank so you can move it wherever you want and it will still follow the tank around. As for rotation, cameras don't have rotation, instead they rotate themselves to point at the target, which you can change using setTarget(). Hope that helps
Tell me what you cherish most. Give me the pleasure of taking it away.
Post Reply