namreeb / namigator

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

Dungeons, query_z & pathing. #39

Closed devw4r closed 1 year ago

devw4r commented 1 year ago

Both not working inside dungeons. Probably related to #38.

image

namreeb commented 1 year ago

I tried pathing in the doorway in the screenshot and it worked. That could be because of the query_z fixes, I'm not sure. But I think this can be closed too?

devw4r commented 1 year ago

I will re check later today @namreeb , will post back here.

devw4r commented 1 year ago

Apparently, this has to do with still wrong Z (Above terrain) being returned when mobs are chasing you inside a cave and running alongside a wmo wall, for now I added some checks in order to prevent trusting namigator Z on this scenarios. https://github.com/The-Alpha-Project/alpha-core/pull/917/files

namreeb commented 1 year ago

Okay thanks that is useful insight. I'm trying to get the alpha core running locally right now.

devw4r commented 1 year ago

image Namigator returned wrong Z: 122.01835632324219 for 2052.188232421875 1834.0185546875 107.90196228027344 Map 0

image Namigator returned wrong Z: 117.56498718261719 for 2050.06396484375 1843.5313720703125 106.02456665039062 Map 0

image Namigator returned wrong Z: 124.09246063232422 for 2038.1925048828125 1843.1253662109375 105.71818542480469 Map 0

image Namigator returned wrong Z: 59.45693588256836 for -8820.806479783681 556.4780671116118 94.63434322580075 Map 0

image Namigator returned wrong Z: 106.22624206542969 for -8822.2373046875 509.4411315917969 98.68303680419922 Map 0

namreeb commented 1 year ago

Leaving myself some notes here.

Namigator returned wrong Z: 122.01835632324219 for 2052.188232421875 1834.0185546875 107.90196228027344 Map 0

image

I think the problem here is that we are using the mesh for the hint to the Z search(es), but as you can see in the screenshot above, that inside corner is not part of the mesh. This is because of having eroded the walkable edges. I can see two possible solutions here:

I'm leaning towards the latter because, as evidenced by the screenshot you posted, it certainly is reachable.

namreeb commented 1 year ago

https://github.com/namreeb/namigator/commit/6ccbe817c6555e2683f60fb73cedba3dadde46b1 ended up fixing this, hopefully. But I went with option A from the post above. After experimenting with different mesh settings, I couldn't find a way to make the mesh go all the way into this corner and still be a net positive impact overall. I added some code for the second z query scenario, which is from a start (x,y,z) to a finish (x', y') along the mesh.