[open] GetNormalizedWorldPosition
GetNormalized(Raw)WorldPosition(worldX, worldY, worldZ)
or GetNormalized(Raw)WorldPosition(worldX, worldY, worldZ, *nilable* mapId) returns normalizedX, normalizedY (Any better function name is welcome) Use Case: In LibGPS we abuse the player waypoint to get a second reference point to calculate the current scale of world coordinates to global/universal normalized map positions. This is used to get the TARDIS factor of dungeons (They are bigger on the inside) As we have GetUniversallyNormalizedMapInfo now, it would make all this map ping muting obsolete. Thank You |
With normalized position you mean the 2d map position? I.e. this question is about converting 3d world to 2d map coordinates?
Then I'll just add the related request: https://www.esoui.com/forums/showthread.php?t=9251 Any of the variants proposed by votan or me would help for my use-case. |
Yes, that is basically the same wish.
|
Alternatively the TARDIS factor of a map could be part of the GetUniversallyNormalizedMapInfo function.
* GetUniversallyNormalizedMapInfo(*integer* _mapId_) ** _Returns:_ *number* _normalizedOffsetX_, *number* _normalizedOffsetZ_, *number* _normalizedWidth_, *number* _normalizedHeight_, *number* worldScaleFactor |
The next major update will have GetNormalizedWorldPosition and GetRawNormalizedWorldPosition
|
Quote:
:) |
Quote:
|
Quote:
Quick question, will zoneId be part of the arguments or is it always relative to the current zone? Votan's request didn't specify zoneId but I thought it might be useful given that some maps display more than one zone and GetUnitWorldPosition returns zoneId, worldX, worldY, worldZ. |
* GetNormalizedWorldPosition(*integer* _worldId_, *integer* _worldX_, *integer* _worldY_, *integer* _worldZ_)
** _Returns:_ *number* _normalizedX_, *number* _normalizedY_ You'll supply a world position, including the world id. So it doesn't have to be in the world you're in. However, it will be giving you the normalized position on the currently picked map. So if you want to get the normalized position for a different map, then you would need to change the map before calling this function. |
Is worldId the same as zoneId, or something new and different?
|
World id is not the same as zone id, nor is it new. Both have been around since the dawn of time. Some APIs use world, some use zone. Typically it depends on where the data comes from (we have WorldDefs and ZoneDefs.) Once upon an eon ago, a world could consist of multiple zones, but that was long before the game ever shipped. Now there's a one to one relationship between the world and the zone. For instance, Stonefalls is Zone id 41, World id 198.
Typically positions are world positions, which is why I used world id, but looking through the API, it seems like we usually use zone id to expose it and just get the world id from the zone in the code. So I probably need to change the new API to use zone id instead, to keep it consistent. |
Or is there any API function to map the zoneId to worldId and the other way around?
|
All times are GMT -6. The time now is 08:08 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI