Code: Select all
core::vector3df pos = camera->getPosition();
double xC = pos.X;
double yC = pos.Y;
double zC = pos.Z;
std::cout<<"X "<<xC<<" Y "<<yC<<" Z "<<zC<<std::endl;
if (xC <= -2070 && xC >= -2170){
if (yC <= 260 && yC >= 210){
if (zC <= -1670 && zC >= -1700){
//insert codes here to remove the first map?
device->getFileSystem()->addZipFileArchive("../maps/TeamTemple_q3a.pk3");
q3levelmesh = smgr->getMesh("TeamTemple_q3a.bsp");
q3node = smgr->addOctTreeSceneNode(q3levelmesh->getMesh(0));
camera =
smgr->addCameraSceneNodeFPS(0, 100.0f, 300.0f, -1, 0, 0, true);
camera->setPosition(core::vector3df(-2827,30,-701));
anim = smgr->createCollisionResponseAnimator(
selector, camera, core::vector3df(90,50,30),
core::vector3df(0,-1,0),
core::vector3df(0,50,0));
camera->addAnimator(anim);
anim->drop();
}
}
}
Thanks for your time.