steven
22-07-2009 03:31:50
Hey
A not intuitive issue that you might encounter is that after you created the first PCZone you must not forget to call
Without it you will segfault in void PCZSceneManager::_findVisibleObjects() because the cameraHomeZone will be zero hence you will segfault at
Perhaps adding the _updateBounds call in PCZSceneManager::_findVisibleObjects() could work:
If not at least this would make it easier to debug:
A not intuitive issue that you might encounter is that after you created the first PCZone you must not forget to call
yourCamera->getParentSceneNode()->_updateBounds();
Without it you will segfault in void PCZSceneManager::_findVisibleObjects() because the cameraHomeZone will be zero hence you will segfault at
cameraHomeZone->setLastVisibleFrame(mFrameCount);
Perhaps adding the _updateBounds call in PCZSceneManager::_findVisibleObjects() could work:
// update the camera
((PCZCamera*)cam)->update();
((PCZCamera*)cam)->getParentSceneNode()->_updateBounds(); <--------- add this line
If not at least this would make it easier to debug:
assert( cameraHomeZone && "Did you forget to call yourCamera->getParentSceneNode()->_updateBounds()?");
cameraHomeZone->setLastVisibleFrame(mFrameCount);