Question about modifying Terrain heights

Hello Guys!
Well, I have a question about modify the heights of a terrain. First, I’m using a TerrainQuad to draw the terrain, ok… everything is ok. and my Heightmap is a double array and constantly i’m modifying the values of this Heightmap (It isn’t a Texture, My heightmap is a custom class that implements AbstractHeightMap).
My question is here:
First, I was trying to use the setHeight from the TerrainQuad… but it doesn’t worked… How the coordinates works? The coordinates that requires setHeight is from World coordinates or the point in the heightmap?
Next. How can modify all the height values from the Heightmap that TerrainQuad uses?

Sorry By my english… :smiley:

setHeight uses world coordinates.
To modify all points just create a long list of point and height values, the same number of points as there would be in the terrain. Pass them to setHeight().
TerrainTestModifyHeight has an example of modifying a lot of points at once.

Heightmaps are just used to initially create the terrain, after that you should be using the terrain directly and no modifying any heightmaps.

1 Like

Thanks… I will try. and I will check the example (I was doing that yesterday). If I have a new question, i will post here again.