TerrainData.GetHeight() / GetInterpolatedHeight() - What does it return?

What do these functions return for the height value?

Is it a value between 0 and 1?
Or is it a value between 0 and TerrainData.size.y?

Thanks for letting me know! :slight_smile:

P.S. Unity - please finish your scripting documentation! Its very vague sometimes.

Problem solved - It returns a value between 0 and TerrainData.size.y.

1 Like

how do I use this command??

i don’t know whats wrong with this:

float mittex  = terr.terrainData.size.x / 2;		
		float mittez  = terr.terrainData.size.z / 2;
		float mittey  = terr.terrainData.GetInterpolatedHeight(mittex,mittez);

thanks for help

Can you provide more info…like what is it not doing that you are expecting it to do?
Looking at your code, it should provide the height of the terrain at the center. What are you getting?