Thread Tools Display Modes
11/09/20, 03:21 AM   #1
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
[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
  Reply With Quote
11/09/20, 08:52 AM   #2
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
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.
  Reply With Quote
11/09/20, 10:08 AM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Yes, that is basically the same wish.
  Reply With Quote
11/13/20, 01:52 AM   #4
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
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
  Reply With Quote
11/19/20, 08:13 PM   #5
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
The next major update will have GetNormalizedWorldPosition and GetRawNormalizedWorldPosition
  Reply With Quote
11/19/20, 11:57 PM   #6
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ZOS_DanBatson View Post
The next major update will have GetNormalizedWorldPosition and GetRawNormalizedWorldPosition
Thank You,
  Reply With Quote
11/20/20, 11:20 AM   #7
AlbinoPython
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 24
Originally Posted by ZOS_DanBatson View Post
The next major update will have GetNormalizedWorldPosition and GetRawNormalizedWorldPosition
  Reply With Quote
11/20/20, 02:06 PM   #8
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
Originally Posted by ZOS_DanBatson View Post
The next major update will have GetNormalizedWorldPosition and GetRawNormalizedWorldPosition
Thanks so much!
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.
  Reply With Quote
11/24/20, 10:51 AM   #9
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
* 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.
  Reply With Quote
11/24/20, 11:04 AM   #10
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Is worldId the same as zoneId, or something new and different?
  Reply With Quote
11/24/20, 11:00 PM   #11
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
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.
  Reply With Quote
11/25/20, 03:20 AM   #12
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,912
Or is there any API function to map the zoneId to worldId and the other way around?
  Reply With Quote

ESOUI » Developer Discussions » Wish List » [open] GetNormalizedWorldPosition

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