http://www.ogre3d.org/forums/viewtopic.php?f=2&t=62468
The problem was that when you get far from the scene's root (0,0,0) RaySceneQuery starts to fail.
The old thread suggests the problem is floating point precision, which is NOT true.
The cause:
=========
ST_GENERIC seems to default to OctreeSceneManager (and maybe some other scene types).
That leads to RaySceneQuery to default to OctreeRaySceneQuery.
OctreeRaySceneQuery uses the following line:
Code: Select all
static_cast<OctreeSceneManager*>( mParentSceneMgr ) -> findNodesIn( mRay, _list, 0 );
_findNodes checks with the ray intersects with the Octree and returns false if it doesn't.
Octree seems to default to (-10000, 10000).
And that's the reason why RaySceneQuery fails.
Thank god for open source!
The solution:
===========
static cast the SceneManager to OctreeSceneManager and use resize().