Issue with tileLoaded

Sabe

20-07-2006 14:51:56

I am having an issue getting the worldBBox of the current tile being loaded.

Using this method with a SceneManager typecasted as a PagingLandscapeSceneManager, I get a crash in Debug as I saw in another forum.

Ogre::Real pageX=event->mPagex;
Ogre::Real pageZ=event->mPagez;
Ogre::PagingLandScapePage* page=mSceneMgr->getPageManager()->getPage(pageX, pageZ); //crashed here

Ogre::Real tileX=event->mTilex;
Ogre::Real tileZ=event->mTilez;
Ogre::PagingLandScapeTile* tile=page->getTile(tileX, tileZ);

Ogre::AxisAlignedBox box = tile->getWorldBbox();



I then changed it to

Ogre::Real pageX=event->mPagex;
Ogre::Real pageZ=event->mPagez;

Ogre::Real tileX=event->mTilex;
Ogre::Real tileZ=event->mTilez;

Ogre::AxisAlignedBox box = event->mBbox;


It doesn't crash, but the box is all minimums of -0.5 and all maximums of 0.5 no matter the tile I'm on. Is this box supposed to be the tile world box? If not, how would I get it without a typecast? If so, does anyone have any idea why the value's are incorrect?

tuan kuranes

24-07-2006 20:56:04

was a bug, fixed in cvs.
thanks