If all you want is the ability to place the camera a certain amount above the terrain, why not use a collider of some sort?
You could just place the camera as the child of a cylinder and give the cylinder constraints for rotating on the x and z axis. Then move the camera up by your offset from the terrain variable. Anytime you want to move the camera give it a push through a rigidbody connected to the cylinder.
if you’re trying to orient the object to “walk” on the terrain, just cast a ray downwards, get the normal of the surface from the hitInfo, and rotate your object so its up vector points in the same direction as the normal