namreeb / namigator

An intelligent navigation API for World of Warcraft Alpha, Vanilla, TBC and WotLK
MIT License
49 stars 32 forks source link

Broken WMO rotation #67

Closed GrenderG closed 4 months ago

GrenderG commented 5 months ago

Cave next to these coords appears to be broken: image

[WARNING] [24/06/2024 16:39:38] Unable to find path, map 0 loc -1202.86, -2087.67, 49.5209, 5.13929060622651 end -1196.7384033203125, -2101.587158203125, 51.6191291809082, 2.0734519958496094
devw4r commented 5 months ago

Adding some example:

-1173.688 -2046.505 Map 0 (Real Z: 37,32 , Namigator resolves: 56.706)

image

namreeb commented 4 months ago

image This is where namigator sees that z value. So I'm guessing there are multiple versions of this cave in the MPQs and we're loading the wrong one.

Edit:

Notes to self:

This is world\wmo\dungeon\md_ogremound\md_grogremound.wmo (id: 194844)

namreeb commented 4 months ago

Seems to be loading the right file (I can only find one version of this wmo). But there is something wrong. Here is how this looks in the viewer. Note the cave poking above the terrain in the rear. image

namreeb commented 4 months ago

Also broken in Vanilla.

namreeb commented 4 months ago
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, 52.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, 53.5, 0)
WMO world\wmo\dungeon\md_ogremound\md_grogremound.wmo rotation: (7, 281.5, 5.5)
WMO world\wmo\azeroth\buildings\keepwall\wallpieceruin04.wmo rotation: (0, 37.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpieceruin03.wmo rotation: (0, -4, 0)
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, 0, 0)
WMO world\wmo\azeroth\buildings\keepwall\gateruined02.wmo rotation: (0, 180, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, -6, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, -37.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, -18.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, 39.5, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall01.wmo rotation: (0, 90, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall02.wmo rotation: (0, 61, 0)
WMO world\wmo\azeroth\buildings\keepwall\gate02.wmo rotation: (0, 90, 0)
WMO world\wmo\azeroth\buildings\keepwall\gate02.wmo rotation: (0, 90, 0)
WMO world\wmo\azeroth\buildings\keepwall\keepbridge01.wmo rotation: (0, -89.5, 0)
WMO world\wmo\lorderon\buildings\alterac\greenhouse01.wmo rotation: (0, 90, 0)
WMO world\wmo\azeroth\buildings\chapel\duskwoodchapel.wmo rotation: (0, 270.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, -69.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, -50, 0)
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, -130, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, 46.5, 0)
WMO world\wmo\azeroth\buildings\duskwoodabandoned_humantwostory\duskwoodabandoned_humantwostory.wmo rotation: (0, 141.5, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall02.wmo rotation: (0, 129, 0)
WMO world\wmo\azeroth\buildings\westfall_human_farm_burnt\westfallfarmhouseburnt.wmo rotation: (0.5, -25.5, -1.5)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece03.wmo rotation: (0, 0, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\wreckedbuildinghcorner02\wreckedbuildinghcorner02.wmo rotation: (-32.5, 268, 39.5)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall01.wmo rotation: (0, -90, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece04.wmo rotation: (0, 37.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpost02.wmo rotation: (0, -0.5, 0)
WMO world\wmo\azeroth\buildings\westfall_human_farm_burnt\westfallfarmhouseburnt.wmo rotation: (7.5, -91.5, -2)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece04.wmo rotation: (0, -39.5, 0)
WMO world\wmo\dungeon\md_cryptonerm\md_cryptonerm.wmo rotation: (0, 450, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, 49, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingsbig03.wmo rotation: (0, 143.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\gate02.wmo rotation: (0, 89.5, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\wreckedbuildinghcorner02\wreckedbuildinghcorner02.wmo rotation: (-24.5, -83, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall02.wmo rotation: (0, 253.5, 0)
WMO world\wmo\azeroth\buildings\westfall_human_farm_burnt\westfallfarmhouseburnt.wmo rotation: (0, 89.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece02.wmo rotation: (0, 0, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall02.wmo rotation: (0, -270.5, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece03.wmo rotation: (0, 0, 0)
WMO world\wmo\lorderon\collidabledoodads\arathihighlands\humanruinedbuildings\huruinedbuildingssmall01.wmo rotation: (0, 90, 0)
WMO world\wmo\azeroth\buildings\keepwall\lowwallpost01.wmo rotation: (0, 96.5, 0)
WMO world\wmo\azeroth\buildings\duskwood_stable\duskwood_stable.wmo rotation: (0, -91, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpost02.wmo rotation: (0, 0, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpost02.wmo rotation: (0, 0, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpost02.wmo rotation: (0, 0, 0)
WMO world\wmo\azeroth\buildings\keepwall\wallpiece05.wmo rotation: (0, 90, 0)
namreeb commented 4 months ago

world\wmo\lorderon\collidabledoodads\arathihighlands\wreckedbuildinghcorner02\wreckedbuildinghcorner02.wmo is probably a simpler starting point. It only has one non-vertical rotation (-24.5, -83, 0). The top left corner should be about (-1583.397, -1766.481, 77.40788) but is currently computed to (-1588.05, -1762.21, 76.4336).

namreeb commented 4 months ago

The problem ended up being the order in which the x, y, and z rotations were applied to produce the final transform matrix. This was fixed in commit https://github.com/namreeb/namigator/commit/2d279e50c8b5c69407817a95309b4ae13ea650de.