View Single Post
11/27/22, 07:43 AM   #6
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
oh btw, player position:
Lua Code:
  1. local playerUnitTag = "player"
  2.  
  3. --- @return zoneId integer, worldX integer, worldY integer, worldZ integer
  4. local zoneId, worldX, worldY, worldZ = GetUnitWorldPosition(playerUnitTag)
  5. local zoneId, worldX, worldY, worldZ = GetUnitRawWorldPosition(playerUnitTag)
  6.  
  7. --- @return normalizedX number, normalizedZ number, heading number, isShownInCurrentMap bool
  8. local normalizedX, normalizedZ, heading, isShownInCurrentMap = GetMapPlayerPosition(playerUnitTag)

Maybe some libs can help here too, check the Lib descriptions for the ones relating to maps, positions, etc. and also to calculate between normalized and actual positions (not sure which lib was supporting this, maybe LibMapPin or LibGPS?).

Last edited by Baertram : 11/27/22 at 07:47 AM.
  Reply With Quote