Thread Tools Display Modes
03-03-10, 01:11 AM   #1
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
GetPlayerBearingFunction() Request...

Hi, since i installed the nUI minimap plugin (the one that moves the minimap from the center of the dashboard over to the right panel so that it is not covered up by the Focus), I have been having trouble with both TomTom's and Zygor's waypointing arrows not showing the correct distance to waypoints. I have found that if I disable this nUI plugin on per-character basis, this problem does not occur. My main character is a hunter, and I want to see her minimap in the right panel of nUI and the focus in the center of the dashboard, so I have left the nUI minimap plugin enabled just for her. I want my other characters to be able to use the TomTom and Zygor waypoint arrows, so I have disabled the nUI minimap plugin so that the waypoint arrows will show the proper distance to the waypoint, at least for now.

After doing some research online, I found a thread by TomTom's author, explaining that this waypoint arrow issue is caused by any minimap addon that re-parents the player arrow. The author suggested that I request that you add a GetPlayerBearingFunction() to the nUI minimap plugin that contains the following code:

function GetPlayerBearing()
local obj; -- Remains an upvalue
do
local t = {Minimap:GetChildren()}; -- Becomes garbage
for k, v in pairs(t) do
if v:IsObjectType("Model") and not v:GetName() then
local model = v:GetModel():lower()
if model:match("interface\\minimap\\minimaparrow") then
obj = v; break;
end
end
end
end
if not obj then return; end

-- If we've found what we were looking for, rewrite function to skip the search next time.
GetPlayerBearing = function()
if GetCVar("rotateMinimap") ~= "0" then
return (MiniMapCompassRing:GetFacing() * -1)
else
return obj:GetFacing();
end
end
return GetPlayerBearing();
end

The full text of the author's comment regarding this issue may be found at: http://www.wowinterface.com/download...ge=62#comments

I hope that you will somehow be able to implement this function into the nUI minimap plugin, and distribute a patch or fix for this particular plugin. Until then, I will disable the nUI minimap plugin on my characters that need the waypoint arrows to show the correct distance to the waypoint. Thanks again!

Last edited by Mairna : 03-03-10 at 01:15 AM.
 
03-03-10, 05:06 AM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I will get this patch in place. If you don't see it by this weekend, please remind me.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-03-10, 06:26 PM   #3
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Thank you very much !!!
 
03-08-10, 07:51 AM   #4
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Patch for nUI Minimap Plugin?

Hi, you wanted me to remind you about the GetPlayBearing() Function patch for the nUI InfoPanel Minimap plugin. Have you had chance to get that function working yet? I know how busy you've been, so I'm sure you'll be getting around to it soon. Thanks!
 
03-08-10, 08:42 AM   #5
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
No, I got caught up in trying to resolve the key binding bug in nUI this weekend and didn't get to it. I will, however, get an update to the minimap out today to address that for you.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-08-10, 10:11 PM   #6
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Minimap Patch...

Tyvm !!!
 
03-09-10, 05:22 AM   #7
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Still caught up in the key bindings thing... sorry. I should be able to get your minimap fix out today since I think I've got the worst of the key binding thing locked down yesterday.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-11-10, 04:17 PM   #8
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
If you would, save the attached file in [ Interface > AddOns > nUI_InfoPanel_Minimap ] and let me know if it fixes the problem you're having.

.
Attached Files
File Type: lua nUI_InfoPanel_Minimap.lua (12.6 KB, 636 views)
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-19-10, 03:06 PM   #9
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Ok, thank you! I will download the attached file and try it out. I will apprise you as to my success in applying the fix. Take care!
 
03-19-10, 04:16 PM   #10
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Problem Still Not Fixed, Sorry...

Nope, I installed the attached LUA file as you recommended, and TomTom is still broken (not displaying distance to waypoint properly) when the Minimap plugin is enabled. Thanks for trying - I am sure you will find something that works soon. Until then, I will disable the Minimap plugin so as to make TomTomwork correctly.
 
03-19-10, 04:23 PM   #11
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
My guess is that TomTom breaks when the minimap is hidden because the minimap is not updating in which case the compass ring is not moving. (based on the code fragment I was asked to add).

I can't think of a work-around for that atm.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-19-10, 04:41 PM   #12
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
I'm looking at this issue and I'm wondering if TomTom is still expecting addon authors to provide this "GetPlayerBearing" function and if so, why?

WoW has the following built in function which it appears would work all of the time...

http://wowprogramming.com/docs/api/GetPlayerFacing

Wouldn't that be easier than trying to rely on the orientation of the compass ring on the minimap?
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-19-10, 04:45 PM   #13
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Just out of curiosity... does this version work?

.
Attached Files
File Type: lua nUI_InfoPanel_Minimap.lua (11.9 KB, 642 views)
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-22-10, 05:36 PM   #14
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Fixed!

It didn't appear so at first, but I just logged into the game and tried the TomTom waypoint arrow, and your patch appears to have fixed the problem. The waypoint arrow is showing both the proper distance and direction. Apparently the GetPlayerFacing() function did the trick.

I have yet to upgrade nUI to the latest version, however. I will be careful not to overwrite the Minimap plugin patch that you wrote for me. Thank you so much, and good luck with nUI version 6!
 
03-22-10, 07:16 PM   #15
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
You shouldn't have to worry about overwriting the patch since it is in a separate plugin from the main nUI app.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
03-23-10, 04:03 AM   #16
Mairna
A Deviate Faerie Dragon
Premium Member
Join Date: Dec 2009
Posts: 18
Thanks, but I spoke too soon...

OK, thanks for that info. Unfortunately, I thought the problem was fixed, but I spoke too soon. I tested it further tonight, and noticed that the TomTom waypoint arrow still breaks (does not show direction or distance to waypoint) after it sets a waypoint showing your body after a death. I'm not certain what is going on, since it seemed to work correctly before this point. Sorry for the bad news. I will continue to monitor the waypointing behavior, and failing a fix, I will disable the Minimap plugin and continue to have the minimap in its standard upper right corner position as determined by Blizzard. Thanks!
 
03-23-10, 04:09 AM   #17
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
You know that you don't have to use the minimap plugin to have nUI manage the minimap still, right? You can disable the minimap plugin and then type '/nui minimap' to have nUI put the minimap in the dashboard.

The waypoint likely breaks when you're a ghost because you don't have a body. I dunno. You might want to post to Cladhaire about it. I've already posted over there about the GetPlayerFacing() method.
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Technical Support » GetPlayerBearingFunction() Request...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off