Is there a way to create "snap to surface" constraint? https://i.imgur.com/K8rOWnm.mp4
Here's a visual example of what I want to make (I did it by using "snap during transform" on "face" mode)

basically I want to create a camera that's always offset X amount of distance from floor that's under it automatically, just Z axis to be constrained 

I already tried using floor constraint but it never really works

please help me out
Tell me if this is what you want:


Create a plane, go in Edit mode, W > Subdivide a bit and assign the whole mesh a Group name in Properties > Data > Vertex Groups.
Give your Camera a Copy Location constraint, choose the plane as the Target, then choose the Group. Click Offset and move the Camera until it is over the plane at the place you want.
Give your plane a Shrinkwrap modifier and choose the ground as your Target.
Move your plane, the Camera should follow the ground on the same Z distance all along.