Check my accessibility addon FCOAccessibility, function getDistanceToLocalCoords(locX, locY, playerOffsetX, playerOffsetY)
It determines the distance to a group member to write it to the chat for visibly impaired players, so the screen/chat reader reads it out to them.
It uses LibGPS.
e.g. check function getGroupLeaderDistance() to see how it calculates the distance to the group leader.
Should be adoptable for the other group members/unit tags too then.
if you spy and/or use code please provide credit (also to WayshrineIt addon as I have taken my idea from it's code) in your addon description.
Last edited by Baertram : 10/24/23 at 08:31 AM.
|