whoops, I have been playing around wiht it I don't get compiler erros anymore.. think is was realted to pointers (I hate them, and I hate interclass communication even more
okies.. when I call my function
Code: Select all
CurrentCameraLocation=camera->getPosition();
from anywhere other than in the OnEvent() , I get exception errors (pointers again ..yuck) (whihc is my mistake and not the engines). I'm trying to find the best place to put the.
Code: Select all
CurrentCameraLocation=camera->getPosition();
ATM. it is inside my OnEvent(), when I press RETURN to switch cameras. but for some reason it doesn't restore the position. when I switch back to FPS camera
Code: Select all
...
{
model1->setVisible(true);
model2->setVisible(true);
campFire->setVisible(true);
timeForThisScene = -1;
camera = sm->addCameraSceneNodeFPS(0, 100.0f, 300.0f);
camera->setPosition(CurrentCameraPosition); //restore saved position
scene::ISceneNodeAnimatorCollisionResponse* collider = sm->createCollisionResponseAnimator(metaSelector, camera, core::vector3df(30,50,30), core::vector3df(0, zoneLevelMesh ? -100.0f : 0.0f,0), 100.0f,core::vector3df(0,40,0), 0.0005f);
camera->addAnimator(collider);
collider->drop();
break;
}
...
come to think of it, I have no idea where it is getting the X,Y,Z from..