plz help.blinking objects.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
bongse1
Posts: 14
Joined: Mon Jul 26, 2010 11:41 am

plz help.blinking objects.

Post by bongse1 »

scene::IAnimatedMesh* mesh = smgr->getMesh("castle.X");
scene::ISceneNode* node = sceneManager->addMeshSceneNode(mesh);
...
irr::scene::ICameraSceneNode* cn = smgr->addCameraSceneNodeFPS();

as I turn around camera,the object blinks.Does anyone know why?
Initially,the camera is located in front of the castle x file boject.Actually the camera touches the surface of the x file object.So the x file object is not drawn,but if I rotate the camera,the front of the camera doesn't touch the objects,so the x file object is drawn.This is fair.But As I move the camera away from this location with,

//irr::scene::ICameraSceneNode* cn = smgr->addCameraSceneNodeFPS/);
cn->setPosition(core::vector3df(0.0,0.0,-100.0));

it still behaves the same.When the camera faces toward the foremost direction the object is not drawn,though the locataion of it has been receded by 100 z direction.It still behaves the same as if the camera is located in front of the object.At this time it's right that the object is not drawn because the camera and object is touched.So object is not drawn when the camera sees the foremost direction,because the camera itself penetrates the object.Can anyone help me?
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Post by Iyad »

Try changing the position of the cameras clipping planes. change the far value to let your camera see at a greater distance and the near value to 0.0f.
#include <Iyad.h>
Post Reply