ECS Character Cliff Detection and collision

Is there any way for the ecs character to detect cliffs and don`t let the character step down?

Like here, don`t like character go to water