Creating bat sonar

I am currently attempting to create a sonar, like a bat so when you press an input button a sonar pulse will fire from the player showing the players surroundings to a certain distance, and pressing the input button again would fire another pulse, I am just wondering if I could get any help with the starting steps to creating this mechanic. Thank you.

the first thing that comes to mind for me would be to use a collision volume and line traces. basically when you press the button you would get all characters overlapping the volume then have a for each connected to a line trace to see if the character is visible or hidden behind a wall.

this is the basics

my solution so far for Sonar vision. UE4.26 year 2021
It is not exactly echolocation though.

Hope it helps