I Also thought about that,
but every time when i test it, it was the last chil.
But, i have one more question, why does this two ways to get the terrain height doesn´t work:
First Way:
VObject::kiObject->Y = TerrainHeight(cTerrain, kiObject->X*2,kiObject->Y*2); // 2 is the Meter per tile
Second way:
if(LinePick(&cPick, Vec3(kiObject->X,kiObject->Y,kiObject->Z), Vec3(kiObject->X,kiObject->Y-10,kiObject->Z), 5))
{
kiObject->Y = cPick.Y;
std::cout << cPick.Y << std::endl;
}
Can some one help me?
greats