Initially I assumed this was a fairly simple problem, and that it was stored relative to the position of the node in world space.
However, it appears I'm incorrect. I'm trying to get each vertex of an object, and adjust its Y axis, so its roughly the same as the terrain height underneath it.
I was planning to do something like this:
Code: Select all
f32 h = terrn->getHeight(
node->getPosition().X +currentVertex[vtx].Pos.X ,
node->getPosition().Z+currentVertex[vtx].Pos.Z);
So, excuse my stupidity if this question is obvious, but what are the vertex positions actually relative to?