right now i test it by set waypoint on the place where target is, and use WaypointIt addon
but what about dynamic targets?
first of all i need to test Long Shots passive, i know you dont need maximum range to deal 12% dmg but like 20 meters only
thats why i need it, and ye will be very usefull for some builds to keep distance
The API does not offer a direct way anymore. If you only need to know if it is inside 20m, you could slot a skill that targets a single enemy and has such a range.
The only UI element which provides distance is a compass. If you have target displayed on the compass (enemy target, red dot), it is possible to tell distance between you and your target. Long time ago I have created addon which shows distance to the center overed pin - CompassDistance-0.4.zip. Maybe someone can enhance it to show distance between you and the target?