Can I get the depth of each area as a float?

I want to recognize the floor at the beginning,

and recognize that the depth has entered a certain height or more from the floor.

Are there any related methods?