How do I sort an array by distance?

Awesome function, it’s a shame it’s not a part of the engine code (should be in Gameplay Statics or sth).

Just one small remark - for optimization I’d advise using GetSquaredDistanceTo, as we don’t need absolute distances anywhere.