Thread Tools Display Modes
07/06/17, 03:34 PM   #1
dorrino
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 50
[outdated] Set3DRenderSpaceToUnitTag(control, unitTag)

Currently the only way (known to me) to read 3D coordinates of any ingame entity is to use your camera location as a reference using Set3DRenderSpaceToCurrentCamera, then read its coordinates using Get3DRenderSpaceOrigin, then do some Black Magic(tm) to find 3d coordinates of the player from 3d coordinates of the camera and THEN use 3d coordinates of the player along with his 2d map coordinates to find 3d coordinates of a map entity.

This becomes a pain since there's no clear way to find 3d coordinates of the player himself from the coordinates of the camera. I use a bunch of workarounds in my pvpalerts for this.

Additionally one of the major problems is to determine height or Y-axis position of an entity with known x,y 2d coordinates on the map.

So, generally, there's a need to find 3d coordinates of an entity in the gameworld or at least a precise correspondence between its 3d coordinates and map coordinates.

The proposed function Set3DRenderSpaceToUnitTag(control, unitTag) will take 'player' and 'groupX' unittags as its input and should solve this problem of locating 3d coordinates of the player himself and his group members.

Second request is to return Y-3d coordinates (or all X,Y,Z - 3d coordinates) along with 2d map coordinates in various functions like GetAvAObjectiveInfo, GetMapPlayerPosition etc. I assume this request might be more complicated than Set3DRenderSpaceToUnitTag proposed above, though. But it will allow to put custom 3d controls anywhere in the gameworld with the necessary precision.

Thank you.
 
07/06/17, 04:11 PM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
I think your later suggestion might actually be easier to implement than Set3DRenderSpaceToUnitTag(control, unitTag), because a render space doesn't just have an origin but also forward/up/left vectors (i.e. view direction and roll). I don't think the client knows more about other characters view direction than the heading.

I would like to second the request for GetMapPlayerPosition to return 3d information or adding a similar function. Maybe it is possible to implement a GetWorldPlayerPosition(unitTag) function, which returns the 3d position of the specified unit. That information might already be available to the client as it's just the position of the 3d model or the floating group marker (?).
The position could then be converted via the WorldPositionToGuiRender3DPosition function Chip proposed here:
http://www.esoui.com/downloads/info1....html#comments
The first change I'll be making is to automatically update the origin point on any toplevel gui render space that is using the WORLD system when the player moves more than 1KM from the origin. The second change will be adding GuiRender3DPositionToWorldPosition and WorldPositionToGuiRender3DPosition. And the third will probably be to never use the integer world coordinates ever again in Lua.

Last edited by Shinni : 07/06/17 at 04:18 PM.
 
07/06/17, 06:10 PM   #3
dorrino
AddOn Author - Click to view addons
Join Date: Mar 2015
Posts: 50
Originally Posted by Shinni View Post
I think your later suggestion might actually be easier to implement than Set3DRenderSpaceToUnitTag(control, unitTag), because a render space doesn't just have an origin but also forward/up/left vectors (i.e. view direction and roll). I don't think the client knows more about other characters view direction than the heading.
Makes sense, though for player and group members the client should know their map headings. So it can get the direction of the control from there (and in the worst case assume vertical angle to be zero).

Originally Posted by Shinni View Post
I would like to second the request for GetMapPlayerPosition to return 3d information or adding a similar function. Maybe it is possible to implement a GetWorldPlayerPosition(unitTag) function, which returns the 3d position of the specified unit. That information might already be available to the client as it's just the position of the 3d model or the floating group marker (?).
The position could then be converted via the WorldPositionToGuiRender3DPosition function Chip proposed here:
http://www.esoui.com/downloads/info1....html#comments
Yep this will solve the major problem (linking player map coordinates to player 3d coordinates), but will still leave the second problem unsolved (getting 3d coordinates of entities on the map - specifically the height (y-coordinate) since we will know 3d x and z by that time).

Will be a good start though.

Last edited by dorrino : 07/06/17 at 06:17 PM.
 

ESOUI » Developer Discussions » Wish List » [outdated] Set3DRenderSpaceToUnitTag(control, unitTag)

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