Min. Distance for Spotlights in Ogre3d?

I have a simple scene with only one empty box. Within that box I have the camera attached to a scene node, which the user can move (translate/rotate). Additionally a spotlight is attached to the camera's scene node, facing into the same direction as the camera. So when the camera is moved, then the light moves as well.

m_pCamera = m_pSceneMgr->createCamera("Camera");
m_pCamera->setNearClipDistance(0.01);
m_pCamNode->attachObject(m_pCamera);

Light* spotLight = m_pSceneMgr->createLight("spotLight");
spotLight->setType(Light::LT_SPOTLIGHT);
spotLight->setDiffuseColour(1, 1, 1);
spotLight->setSpecularColour(1, 1, 1);
spotLight->setSpotlightRange(Degree(50), Degree(100));
spotLight->setSpotlightNearClipDistance(0);
spotLight->setDirection(m_pCamera->getDirection());
m_pCamNode->attachObject(spotLight);


So, this basically works fine. There is one problem though: As soon as the user moves the camera very close to a side of the box, then suddenly all is black, I can't see anyting. I am sure the camera is NOT moving through the box's side, it is still within the box.

So the problem seems to be that the light does not "work" when it is too close to an object, as if the object (the box side in my case) is not reflecting the light any more.

Any ideas?

• – Philip Allgaier May 1 '13 at 16:33
• @PhilipAllgaier: Correct. I am sorry, but is it considered as bad practice to post a question here and another forum as well? – Matthias May 1 '13 at 17:04
• usually it is considered slightly impolite (especially without bi-directional links) since people might invest time to solve your question here, without knowing that others already solved or at least partially solved in in another forum. so at least put links in to make sure everyone is on the same page. – Philip Allgaier May 1 '13 at 17:11