and having problem to use the "addTerrainSceneNode" with "createCollisionResponseAnimator"
without the engine it works fine
but using it in nge engine, the camera get wrong movements
here is the Terrain Create code:
Code: Select all
ITerrainSceneNode* terrain = smgr->addTerrainSceneNode("Media/Terrain/HeightMap.bmp",
z1->SceneNode(),
-1,
vector3df(0,0,0),
vector3df(0,0,0),
vector3df(100,10,100),
SColor(255,255,255,255),
2,
ETPS_17,
4);
terrain->setMaterialFlag(EMF_LIGHTING,false);
terrain->setMaterialFlag(EMF_FOG_ENABLE,true);
terrain->setMaterialTexture(0,driver->getTexture("Media/Terrain/Ground.png"));
terrain->setMaterialTexture(1,driver->getTexture("Media/Terrain/DetailMap.jpg"));
terrain->setMaterialType(EMT_DETAIL_MAP);
terrain->scaleTexture(1,40);
Code: Select all
ITriangleSelector *selector = smgr->createTerrainTriangleSelector(terrain);
terrain->setTriangleSelector(selector);
ISceneNodeAnimator *anim = smgr->createCollisionResponseAnimator(selector,camera,vector3df(60,100,60),
vector3df(0,0,0),
vector3df(0,0,0));
selector->drop();
camera->addAnimator(anim);
anim->drop();
am i missing something to get smooth camera using Triangle Collision + Terrain ?