Hi All,
Assumming I can get the X and Z coordinate position from
the TerrainSceneNode HOW CAN I GET "Y" POSITION OUT OF IT?
I ask of this, because getCollisionPoint seems not working
on TerrainSceneNode.
Thanks for any hint.
TerrainSceneNode inquiry ?
I'am doing this and it runs :
irr::video::IImage* heightMap = driver->createImageFromFile ("../art/heightmap.bmp");
heightmap is the 256*256 file that generate the terrain.
then a bit later after loading some objects from xml setup :
c = heightMap->getPixel((s32)XMLimportXpos,(s32)XMLimportYpos);
float height = c.b;
node->setPosition(core::vector3df(XMLimportXpos*400 ,
height*10000, XMLimportYpos*400));
the 400 and 1000 are related to the scale of the map.
that should work.
irr::video::IImage* heightMap = driver->createImageFromFile ("../art/heightmap.bmp");
heightmap is the 256*256 file that generate the terrain.
then a bit later after loading some objects from xml setup :
c = heightMap->getPixel((s32)XMLimportXpos,(s32)XMLimportYpos);
float height = c.b;
node->setPosition(core::vector3df(XMLimportXpos*400 ,
height*10000, XMLimportYpos*400));
the 400 and 1000 are related to the scale of the map.
that should work.