Guys, I have a camera that is looking at the center (0,0,0). I have triangle in that position. Now, when I try to rotate camera along z-axis by 45 degrees I would expected that my triangle will be still visible in a viewport but it will be rotated.
However, after performing a rotation I am loosing triangle from a viewport. I am totally lost here, I do not know what am I doing wrong?
Code: Select all
ICameraSceneNode* camera = smgr->addCameraSceneNode(0, vector3df(0, 0, 200), vector3df(0, 0, 0));
camera->bindTargetAndRotation(true);
while (device->run())
{
driver->beginScene(true, true, SColor(255, 100, 101, 140));
camera->setRotation(vector3df(0, 0, 45)); //I want to rotate camera by 45 degrees along z axis but the result is not I would expected.
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
Could you explaine me how to operate camera properly?