- Home /
Question by
mightytron · Feb 09, 2012 at 01:09 PM ·
colliderterrainlod
heightmapMaximumLOD does not refresh the terrain collider?
Hi,
To increase performance our game sets the heightmapMaximumLOD to 1 when setting to fastest quality settings. Unfortunately it seems that the terrain collider is unchanged an still using the high terrain LOD. This results in our character walking through the terrain.
I tried a code like this:
int aWidth = Terrain.activeTerrain.terrainData.heightmapWidth;
int aHeight = Terrain.activeTerrain.terrainData.heightmapHeight;
float[,] aHeights = Terrain.activeTerrain.terrainData.GetHeights(0,0,aWidth,aHeight);
Terrain.activeTerrain.terrainData.SetHeights(0,0,aHeights);
because i red in the documentation that SetHeights will automatically recalculate the Terrain collider but without success.. Any ideas out there?
Thnx a lot..
Comment
Your answer
Follow this Question
Related Questions
How to control Terrain Texture Blur at Distance (pics) 1 Answer
Spherical Terraing LOD 0 Answers
Reduce terrain verts 1 Answer
Gameobject collision with Terrain C# 4 Answers