I've noticed that there's a method for getting the height value of a terrain, but not setting the height value? How should I go about this, what would be the best method? Will it be difficult to implement and what do you think I should before I begin on this path?
Thanks .
Terrain set height? (IrrlichtLime)
Re: Terrain set height? (IrrlichtLime)
The terrain's height comes from the heightmap, it's not settable.
Re: Terrain set height? (IrrlichtLime)
Surely I could alter the mesh once it has been drawn?
Re: Terrain set height? (IrrlichtLime)
Yes, if you use the mesh, but not with the terrain renderer that optimizes the drawing, as it has no logic for that.
Re: Terrain set height? (IrrlichtLime)
So maybe I should go the custom scene node route?
Re: Terrain set height? (IrrlichtLime)
Not necesarily if you know how the terrain is created. It really creates all the vertices of the highest level of detail (the most densely populated mesh), so using a custom structure to accelerate the access, you may actually modify the geomipmap terrain. But there is a simpler, and almost as efficient, now a days anyway, way to edit terrains which is to use the terrain primitive (addHillPlaneMesh, from the SceneManager). Irrlicht has two terrains, one is the terrain scene node, which is the terrain with lods, and the other is a primitive which generates a heightfield out of a picture, but it is just a standard mesh you can modify the usual way.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt