Version: 2017.3
public float SampleHeight (Vector3 worldPosition);

설명

Samples the height at the given position defined in world space, relative to the terrain space.

using UnityEngine;

public class ExampleScript : MonoBehaviour { void LateUpdate() { Vector3 pos = transform.position; pos.y = Terrain.activeTerrain.SampleHeight(transform.position); transform.position = pos; } }