Temp76

10-11-2007 15:12:03

Hi John,

i have to ask might save me a week of trying to work it out, i'm using PLSM2 and i'v just added Pagedgeometry, i'm not getting any error's but i have a small few small problems you might be able to help me with, My problem is

i used the example on the wiki which has a function using RaySceneQuery to get the y value the function on the wiki is

Sorry for taking up your time, any help you can give me would be great, Thanks

i have to ask might save me a week of trying to work it out, i'm using PLSM2 and i'v just added Pagedgeometry, i'm not getting any error's but i have a small few small problems you might be able to help me with, My problem is

HeightFunction::initialize(sceneMgr);

treeLoader->setHeightFunction(&HeightFunction::getTerrainHeight);

i used the example on the wiki which has a function using RaySceneQuery to get the y value the function on the wiki is

float getTerrainHeight(float x, float z)

{

static Ray updateRay;

updateRay.setOrigin(Vector3(x, 10000, z));

updateRay.setDirection(Vector3::NEGATIVE_UNIT_Y);

app -> raySceneQuery->setRay(updateRay);

app -> raySceneQuery->setQueryTypeMask(Ogre::SceneManager::WORLD_GEOMETRY_TYPE_MASK);

app -> raySceneQuery->setWorldFragmentType(SceneQuery::WFT_SINGLE_INTERSECTION);

RaySceneQueryResult& qryResult = app -> raySceneQuery->execute();

RaySceneQueryResult::iterator i = qryResult.begin();

if (i != qryResult.end() && i->worldFragment)

{

return i->worldFragment->singleIntersection.y;

}

return 0;

}

Sorry for taking up your time, any help you can give me would be great, Thanks