Help with RaySceneQuery::execute() and PLSM2

monah

17-03-2008 15:36:52

In the program I use PLSM2, the plug-in is loaded normally, but at performance of the following code:
void Player::update(const Ogre::FrameEvent &evt)
{
mNode->translate(mDirection * evt.timeSinceLastFrame, Ogre::Node::TS_LOCAL);
mAnimStat->addTime(evt.timeSinceLastFrame);
Ogre::Vector3 charPos = mNode->getPosition();
Ogre::Ray charRay(Ogre::Vector3(charPos.x, 5000.0, charPos.z), Ogre::Vector3::NEGATIVE_UNIT_Y);
mRaySceneQuery->setRay(charRay);
Ogre::RaySceneQueryResult &result = mRaySceneQuery->execute();
Ogre::RaySceneQueryResult::iterator itr = result.begin();
if(itr != result.end() && itr->worldFragment)
{
Ogre::Real height = itr->worldFragment->singleIntersection.y;
mNode->setPosition(charPos.x, height, charPos.z);
}
}

The program comes to an end with a mistake:
Assertion failed: (min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner", file ../
../../../OgreSDK/include/OgreAxisAlignedBox.h, line 239

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

The mistake occurs in a line:
Ogre::RaySceneQueryResult &result = mRaySceneQuery->execute();
Prompt that I do not so?