I've been using one of the examples (http://irrlicht.sourceforge.net/phpBB2/ ... c&start=15) in the howtos section of the fourm and it seems to work fairly well except when the node turns or pitches the camera jumps in the opposite direction, once the turn operation is complete the camera fixes its self and ends up in hte correct postition. does anyone know why this happens here is the code for the camera movement:
Code: Select all
void makeCockpit(irr::scene::ICameraSceneNode *camera,
irr::scene::ISceneNode *node,
irr::core::vector3df offset)
{
irr::core::matrix4 m;
m.setRotationDegrees(node->getRotation());
irr::core::vector3df frv = irr::core::vector3df (0.0f, 0.0f, 1.0f);
m.transformVect(frv);
irr::core::vector3df upv = irr::core::vector3df (0.0f, 1.0f, 0.0f);
m.transformVect(upv);
m.transformVect(offset);
offset -= node->getPosition(); // I had to change this from += to -=
camera->setPosition(offset);
camera->setUpVector(upv);
offset += frv;
camera->setTarget(offset);
}