Code: Select all
scene::ICameraSceneNode * mainCam = smgr->addCameraSceneNode(0, vector3df(0,0,0), vector3df(0,0,0));
core::array<irr::core::vector3df> camPath;
camPath.push_back(core::vector3df(500, -60, 630));
camPath.push_back(core::vector3df(640, -60, 285));
camPath.push_back(core::vector3df(430, -60, 80));
camPath.push_back(core::vector3df(130, -60, -105));
camPath.push_back(core::vector3df(-270, -60, -90));
camPath.push_back(core::vector3df(-430, -60, 220));
camPath.push_back(core::vector3df(-220, -60, 603));
camPath.push_back(core::vector3df(220, -60, 640));
camPath.push_back(core::vector3df(500, -60, 630));
if (mainCam)
{
scene::ISceneNodeAnimator * anim = smgr->createFollowSplineAnimator(0,camPath,.3,1);
mainCam->addAnimator(anim);
anim->drop();
}
I want to be able to have the camera face forward, towards the next point in the spline. is there a way todo this?