Thread Tools Display Modes
03/20/23, 11:34 AM   #1
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
LIB 3D arrow

Hello i'm trying to create a simple arrow using lib3D arrow, but it isn't working and idk what i'm doing wrong.
This is my code :


function GetPosShuba()
playerX, playerY = LibGPS2:LocalToGlobal(GetMapPlayerPosition("player"))
d("X :" ..playerX .." Y:" ..playerY)

end
function VisShuba()

d("ex2 X :" ..playerX .." Y:" ..playerY)
waypoint = Lib3DArrow:CreateArrow({
depthBuffer = false,
arrowMagnitude = 5,
arrowScale = 1,
arrowHeight = 1,
arrowColour = "FF0000",

distanceDigits = 4,
distanceScale = 25,
distanceColour = "FFFFFF",

markerColour = "FF0000",
markerScale = 1,
})
waypoint:SetTarget(playerX, playerY)
waypoint.arrow:SetHidden(false/ true) --tried both but now working
waypoint.distance:SetHidden(false / true)
waypoint.marker:SetHidden(false / true)
end

SLASH_COMMANDS["/getposshuba"] = GetPosShuba
SLASH_COMMANDS["/visibleshuba"] = VisShuba


Ty for the help in case

Link of Lib3DArrow : https://www.esoui.com/downloads/info...ib3DArrow.html

Last edited by Shuba00 : 03/20/23 at 11:42 AM.
  Reply With Quote
03/20/23, 12:28 PM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Please use the appropriate forums to ask for lua/XML help.
The Addon help/Support forums are for user questions about addons, not coding questions.

btw isn't the actual LibGPS global variable to use LibGPS3?
Migrating from LibGPS2
LibGPS3 offers full backwards compatibility to LibGPS2 (see compatibility.lua), but it's still highly recommended to migrate to the new API.
In order to use the new API, simply access the library via the "LibGPS3" global variable instead of "LibGPS2" or LibStub.
Most functions stayed the same between v2 and v3, but there are a few breaking changes. The following list shows how to migrate those cases.

Last edited by Baertram : 03/20/23 at 12:33 PM.
  Reply With Quote
03/20/23, 04:52 PM   #3
Shuba00
 
Shuba00's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2023
Posts: 18
Originally Posted by Baertram View Post
Please use the appropriate forums to ask for lua/XML help.
The Addon help/Support forums are for user questions about addons, not coding questions.

btw isn't the actual LibGPS global variable to use LibGPS3?


i found out the code can work outside of the dungeons/arenas.
There is any way to make it work inside dungeons?
  Reply With Quote
03/20/23, 05:09 PM   #4
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
No, this is unfortunately prohibited by the game !
Like described here:
https://www.esoui.com/forums/showthread.php?t=9865
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » LIB 3D arrow

Thread Tools
Display Modes

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