namreeb / namigator

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

Precise z values query for a given (x, y) #5

Closed namreeb closed 4 years ago

namreeb commented 7 years ago

Retail sniffs of splines show that the first and last hop on a path have extremely precise values for Z. Intermediate hops can be less accurate. This is probably because for start and stop a more expensive query is used. Currently I plan to use Detour's detail mesh for the intermediate hops and a custom high precision query for the start and stop.

Retail sniff examples (from Azeroth / map 0):

[0] Waypoint: X: 1111.479 Y: -1818.246 Z: 63.10447 actual z: 63.043503  z - actual = 0.060967
[1] Waypoint: X: 1112.965 Y: -1830.395 Z: 62.19612 actual z: 61.473637  z - actual = 0.722483
[2] Waypoint: X: 1113.965 Y: -1837.395 Z: 61.44612 actual z: 61.092140  z - actual = 0.35398
[3] Waypoint: X: 1114.715 Y: -1841.145 Z: 60.94612 actual z: 60.915379  z - actual = 0.030741
[0] Waypoint: X: 1111.479 Y: -1818.246 Z: 63.10447 actual z: 63.043503  z - actual = 0.060967
[1] Waypoint: X: 1112.965 Y: -1830.395 Z: 62.19612 actual z: 61.473637  z - actual = 0.722483
[2] Waypoint: X: 1113.965 Y: -1837.395 Z: 61.44612 actual z: 61.092140  z - actual = 0.35398
[3] Waypoint: X: 1114.715 Y: -1841.145 Z: 60.94612 actual z: 60.915379  z - actual = 0.030741

It is probably the lack of the high precision stop values that ultimately cause players falling through the world following server-controlled movement (from charge, blink, etc.).

namreeb commented 7 years ago

To test ADT hole support for z value query, a good example is in Azeroth at (1748.293579, -661.980042) should have only one result: 45.058178

That result should come from a raycast hit on model TIRISFALLOPENGRAVE01.

Azeroth ADT (33, 28)

To test ADT support (without a hole), an example from right next to the hole example is (1753.842285, -662.430908), and should have a result from ADT quads of 44.429478.

namreeb commented 4 years ago

Test added.