How to check if character leaves the ground?

Hello,
I want to get the z axis value when the character leaves the ground, whether by jumping or just falling. I thought I can use a sphere collider, but I don’t know how to use it.

charactermovementcomponent - isfalling returns is character staying on something or falling.

then, to get height, you must do single line trace from character center to the ground.

trace start = getactorlocation.

trace end = trace start + (0, 0, -1) * 10000.

actors to ignore - self

i was thinking that too but it also kind of sounds like they are looking for a event that fires when the character leaves the ground or a similar binding.