Code: Select all
scene::ISceneNode* camera = smgr->addCameraSceneNodeFPS();
if (camera)
{
camera->setPosition(vector3df(0,150,-100));
camera->setRotation(vector3df(0,90,0));
vector3df position = camera->getPosition();
vector3df wall_1 = vector3df(0,100,-100);
if (wall_1 == position)
{
camera->setPosition(vector3df(0,100,0));
}
}
Now, I want this line of code
Code: Select all
if (wall_1 == position)
{
camera->setPosition(vector3df(0,100,0));
}
so no matter where i am say 34,100,2
or 734,100,2 it will always stop the camera
so whenever the camera gets to the point 100 on axis z it just stops.