Range finder & changing LEDs

Hello all,

I’m an avid Nerf-er, and the issue of needing to angle your shots is always a concern. Is it feasible to make a Nerf-gun-mounted Arduino that uses ultrasonic sensors to find the range of a target, and illuminates one of 5+/- LEDs that you could line up iron sights with to get the right angle? And what would that code look like?

Most ultrasonic rangefinders are wide beam, short range devices - by the time you got close enough to distinguish and detect your target, you might as well just pistol-whip them.