Why terrain.SampleHeight and terrain.terrainData.GetHeight returning diferent results?
Hi i work with terrain (placing Object on it) and when i work with height of terrain a discover that these two method returnig diferent result (and i cant find out why).
float height = terrain.SampleHeight(new Vector3((int)position.x, 0, (int)position.y));
float height2 = terrain.terrainData.GetHeight((int)position.x,(int)position.y);
Debug.Log(height.ToString() + ":" + height2.ToString());
(retype to int just for purpose of test) and result are guite interesting
Sometimes is result almost same like (89.60941:85.10804), but i found few position which are totaly diferent like (0:80.23256)
It seems that Sampleheight is more acurate, but why?