- Home /
Question by
Torrek · Dec 13, 2015 at 11:54 PM ·
terrainarrayheightmapterraindataheightmaps
How do you choose the heights of a terrain using code?
I really need this as I want to make a procedurally generated terrain so are there any way of specifying that the [x,z] position's height in the terrain height data is going to be equal to 4, for example.
Note - I already have a noise generator and know how to set it up with everything else for the world generation process, I just need to know how to change the height of the terrain using code.¨
It's so I can create something like this, just without textures so far:
ue3terrainfinal.jpg
(242.5 kB)
Comment
Answer by thisisdaleb · Mar 28, 2016 at 12:57 AM
You can set heights of a terrain using a matrix of floats with http://docs.unity3d.com/ScriptReference/TerrainData.SetHeights.html