how to rotate a terrain in unity code example
Example: unity rotate player based on terrain
upright = Vector3.Cross(transform.right, -(fHit.point - bHit.point).normalized) transform.rotation = Quaternion.LookRotation(Vector3.Cross(transform.right, upright));