[solved] PagingLandScapeData2DManager::getSingleton()

RB

03-12-2005 12:47:38

Hello,

i am now creating a simple terrain demo in YAKE environment with help of PLSM2.
Demo was build on top of yapp/vehicle demo but it is still very raw. The main goal of this work is to produce environment for modeling large terrain objects which would interact with physics world (basicly using ODE as engine).

After configuring\loading terrain and some over objects i can see them and fly in the scene. But then i try to produce RayQuery application catched an assertion failure. This failure happens from time to time so problem is quite strange.

Ogre::RaySceneQuery sceneQuery = sceneManager->createRayQuery( Ogre::Ray( Ogre::Vector3( 0, 100, 100), Ogre::Vector3::NEGATIVE_UNIT_Y ));

Ogre::Ray ray;
ray.setOrigin( Ogre::Vector3( 0, 100, 100) );
ray.setDirection( Ogre::Vector3::NEGATIVE_UNIT_Y);

sceneQuery->setRay( ray);

Ogre::RaySceneQueryResult & result = sceneQuery->execute( );
^-- here assertion fails


debug output:
OgrePagingLandScapeData2DManager.cpp:76: static Ogre::PagingLandScapeData2DManager& Ogre::PagingLandScapeData2DManager::getSingleton(): Assertion `ms_Singleton' failed.

Any help/suggestions would be appreciated.

tuan kuranes

03-12-2005 13:43:54

if you can see terrain, then PagingLandScapeData2DManager singleton should not assert, as it should exist an instance.

If not it perhaps means there's a problem on the linking, like dll, and .lib coming from different version ?

RB

03-12-2005 16:00:18

Problem were solved when i start calling SceneManager::InitScene() method by hand. But different problem occured - how to get the height information from terrain RaySceneQuery return stabile 0.

Am i using old version of plugin?

tuan kuranes

03-12-2005 18:15:13

do you call the setWorldGeometry ?

Page may no be loaded until first frame is rendered, it may be your problem. Use page preload event to know when and where to query.

RB

05-12-2005 07:28:05

Thanx for the ansver! Page preloading was my problem.