Im currently experimenting with Terrain trees but im stuck at manipulating their position. The following script as far as i know should work, it also transforms the position into local terrain coordinates yet nothing happens.
private void SetTrees()
{
var Trees_On_Terrain = Terrain.activeTerrain.terrainData.treeInstances;
for (int i = 0; i < Trees_On_Terrain.Length; i++)
{
Trees_On_Terrain[i].position = new Vector3(10f /
Terrain.activeTerrain.terrainData.heightmapResolution, 0f, 10f /
Terrain.activeTerrain.terrainData.heightmapResolution);
}
Terrain.activeTerrain.terrainData.SetTreeInstances(Trees_On_Terrain, true);
}
They are put into a near the (0,0,0) coordinate.
Please help!