View Single Post
02-17-14, 06:47 AM   #2
Vlad
A Molten Giant
 
Vlad's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2005
Posts: 793
Math is the answer.

You got your x and y coordinates from GetPlayerMapPosition("player")
You got the wanted x and y position you wish to ping.
Some math should help solve the issue!

The important thing here is how PingLocation behaves, since the coordinates are pixel distances relative to the center of the minimap (positive coordinates are above or to the right of the center, negative are below or to the left), and not world coordinates!

This means you need to account for the zoom levels, get the size of the map and calculate where your desired coordinates lie in the minimap scope of coordinates, then finally apply the ping animation.

Working on the answer as I haven't done this particular formula before. By all means if someone else wishes to reply, do it!
__________________
Profile: Curse | Wowhead

Last edited by Vlad : 02-17-14 at 06:55 AM.
  Reply With Quote