Page 1 of 1

[solved] Objects disappear at large distances

Posted: Thu Jun 19, 2008 10:17 am
by chamile
Hi,

I tested out some movements on larger distances and was surprised, that objects disappear with a distance value of more than 3000. Therefore I used a simple billboard object from one of the examples:

Code: Select all

	irr::scene::ISceneNode *light2 = smgr->addLightSceneNode(0, core::vector3df(0,0,-3000.0),video::SColorf(1.0f, 0.6f, 0.7f, 1.0f), 200000.0f);
	irr::scene::ISceneNode *pbill = smgr->addBillboardSceneNode(light2, core::dimension2d<f32>(695, 695));
	pbill->setMaterialFlag(video::EMF_LIGHTING, false);
	pbill->setMaterialType(video::EMT_TRANSPARENT_ADD_COLOR);
	pbill->setMaterialTexture(0, driver->getTexture("../../media/particlewhite.bmp"));
and watch with a camera to it. When I set the Z position to -3001, it's no more shown. Why?

Posted: Thu Jun 19, 2008 10:47 am
by Gogolian

Code: Select all

camera->setFarValue(100000);
or any other than 1000000 ;)

Posted: Thu Jun 19, 2008 10:51 am
by chamile
Hah! I watched out in the SceneNode objects for something like that, but didn't looked at the camera.

That helped, Thank you :D

Posted: Thu Jun 19, 2008 10:51 am
by Gogolian
no prob ;)