ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   New GuiRender3DPositionToWorldPosition and WorldPositionToGuiRender3DPosition in beta (https://www.esoui.com/forums/showthread.php?t=7243)

dorrino 07/26/17 10:26 AM

New GuiRender3DPositionToWorldPosition and WorldPositionToGuiRender3DPosition in beta
 
OK, the time has come to ask:)

What exactly are world coordinates? What constitutes as the 'world' here? The current zone? All of Tamriel?

Is it akin to lib GPS global map coordinates, but for the 3d world?

How would one convert from those world 3d coordinates to local 3d coordinates?

Thanks.

Shinni 07/26/17 10:39 AM

WorldPosition is the 3d position in relation to the 3d map file of your current zone.
The origin is the most north west point of the current 3d map file (this is not the same as the most north west point on the 2d zone map!)
The units are in centimeters and this coordinate system is also used in the housing system, eg the coordinates of furniture objects.

GuiRenderPosition is the coordinate system used for 3d UI controls. The unit is in meters (not centimeters!) and the origin is the character's position after the last login/teleport. When the character moves 1km away from the origin, the character's current location becomes the new origin. On live your 3d controls will suddenly shift by 1km when this happens but on PTS this is no longer the case as the position of the controls is updated automatically (according to patch notes, didn't test it).

dorrino 07/26/17 02:25 PM

Quote:

Originally Posted by Shinni (Post 32017)
WorldPosition is the 3d position in relation to the 3d map file of your current zone.
The origin is the most north west point of the current 3d map file (this is not the same as the most north west point on the 2d zone map!)
The units are in centimeters and this coordinate system is also used in the housing system, eg the coordinates of furniture objects.

GuiRenderPosition is the coordinate system used for 3d UI controls. The unit is in meters (not centimeters!) and the origin is the character's position after the last login/teleport. When the character moves 1km away from the origin, the character's current location becomes the new origin. On live your 3d controls will suddenly shift by 1km when this happens but on PTS this is no longer the case as the position of the controls is updated automatically (according to patch notes, didn't test it).

So world 3d coordinates should make a 1-to-1 correspondence with ui 3d coordinates after units conversion and appropriate translation of the origin, right?

Shinni 07/27/17 12:35 PM

Quote:

Originally Posted by dorrino (Post 32022)
So world 3d coordinates should make a 1-to-1 correspondence with ui 3d coordinates after units conversion and appropriate translation of the origin, right?

Yes, but keep in mind that the translation is not fix and changes when teleporting/moving 1km.


All times are GMT -6. The time now is 08:05 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI