Here is the code (I just added this to example 18 to test camera rotation:
Code: Select all
irr::core::vector3df pt = Camera[0]->getAbsolutePosition();
pt += irr::core::vector3df(0,0,1);
Camera[0]->setTarget(pt);
irr::core::vector3df ct = Camera[0]->getTarget();
ct.rotateYZBy(cr, Camera[0]->getAbsolutePosition());
Camera[0]->setTarget(ct);
cr++;
if(cr >= 360)
cr = 0;