Mouse Pick bug: far clip distance

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
icaro56
Greenskin
Posts: 105
Joined: Sun Feb 15, 2009 2:03 am
Location: Belo Horizonte, MG, BRA
x 1

Mouse Pick bug: far clip distance

Post by icaro56 »

Hi,

I am with a problem. I have 2 cameras in my application. A camera stay in MainWindow and other in a TOP VIEW Window.

In TOP view, the camera is a orthographic cam and your far clip distance is 32000.

Code: Select all

mCamera->setRange(1, 32000);
mCamera->setLodBias(100);
mCamera->getOgreCamera()->setProjectionType(Ogre::PT_ORTHOGRAPHIC);

Ogre::Vector3 p = MI->getTerrain()->getCenterPosition();
mCamera->setPosition(p);

mCamera->translate(0, 10000, 0);

mCamera->lookAt(p.x, p.y, p.z);

mCamera->getOgreCamera()->setOrthoWindowHeight(12000);

When I use mouse pick in Main Window the return is always empty. If I decrease the far clip distance of the camera from other view the mouse pick back to work.

It seems that the ray is hitting the other camera and always returning empty when the FAR CLIP is high. Even when I set the top view camera to another query flag continues bug.

How to solve this?
Ícaro Motta
Post Reply